src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java
changeset 57956 e0b8b019d2f5
parent 57793 d372747e8f08
child 57968 8595871a5446
child 58679 9c3209ff7550
equal deleted inserted replaced
57955:18863bf3501f 57956:e0b8b019d2f5
    51 //      policy in HttpURLConnection.  A failure on baz.foo.com shouldn't
    51 //      policy in HttpURLConnection.  A failure on baz.foo.com shouldn't
    52 //      uncache foo.com!
    52 //      uncache foo.com!
    53 
    53 
    54 public abstract class AuthenticationInfo extends AuthCacheValue implements Cloneable {
    54 public abstract class AuthenticationInfo extends AuthCacheValue implements Cloneable {
    55 
    55 
       
    56     @java.io.Serial
    56     static final long serialVersionUID = -2588378268010453259L;
    57     static final long serialVersionUID = -2588378268010453259L;
    57 
    58 
    58     // Constants saying what kind of authroization this is.  This determines
    59     // Constants saying what kind of authroization this is.  This determines
    59     // the namespace in the hash table lookup.
    60     // the namespace in the hash table lookup.
    60     public static final char SERVER_AUTHENTICATION = 's';
    61     public static final char SERVER_AUTHENTICATION = 's';
   496         }
   497         }
   497     }
   498     }
   498 
   499 
   499     String s1, s2;  /* used for serialization of pw */
   500     String s1, s2;  /* used for serialization of pw */
   500 
   501 
       
   502     @java.io.Serial
   501     private synchronized void readObject(ObjectInputStream s)
   503     private synchronized void readObject(ObjectInputStream s)
   502         throws IOException, ClassNotFoundException
   504         throws IOException, ClassNotFoundException
   503     {
   505     {
   504         s.defaultReadObject ();
   506         s.defaultReadObject ();
   505         pw = new PasswordAuthentication (s1, s2.toCharArray());
   507         pw = new PasswordAuthentication (s1, s2.toCharArray());
   507         if (authenticatorKey == null) {
   509         if (authenticatorKey == null) {
   508             authenticatorKey = AuthenticatorKeys.DEFAULT;
   510             authenticatorKey = AuthenticatorKeys.DEFAULT;
   509         }
   511         }
   510     }
   512     }
   511 
   513 
       
   514     @java.io.Serial
   512     private synchronized void writeObject(java.io.ObjectOutputStream s)
   515     private synchronized void writeObject(java.io.ObjectOutputStream s)
   513         throws IOException
   516         throws IOException
   514     {
   517     {
   515         Objects.requireNonNull(authenticatorKey);
   518         Objects.requireNonNull(authenticatorKey);
   516         s1 = pw.getUserName();
   519         s1 = pw.getUserName();