code: public static void setFollowRedirects(boolean set) {
          SecurityManager sec = System.getSecurityManager();
          if (sec != null) {
              // seems to be the best check here...
              sec.checkSetFactory();
          }
          followRedirects = set;
      }
docs: Sets whether HTTP redirects  (requests with response code 3xx) should
  be automatically followed by this class.  True by default.  Applets
  cannot change this variable.
  <p>
  If there is a security manager, this method first calls
  the security manager's {@code checkSetFactory} method
  to ensure the operation is allowed.
  This could result in a SecurityException.
  
  @param set a {@code boolean} indicating whether or not
  to follow HTTP redirects.
  @exception  SecurityException  if a security manager exists and its
  {@code checkSetFactory} method doesn't
  allow the operation.
  @see        SecurityManager#checkSetFactory
  @see #getFollowRedirects()