# HG changeset patch # User juh # Date 1374002381 25200 # Node ID 90956ead732f7f5245eb72fb47a4c4b9c0aa4303 # Parent ec84f0c313b0b0d6ff759708973a902748987e4d 8020557: javadoc cleanup in javax.security Reviewed-by: darcy diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/AuthPermission.java --- a/jdk/src/share/classes/javax/security/auth/AuthPermission.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/AuthPermission.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,10 +41,10 @@ * *
  *      doAs -                  allow the caller to invoke the
- *                              Subject.doAs methods.
+ *                              {@code Subject.doAs} methods.
  *
  *      doAsPrivileged -        allow the caller to invoke the
- *                              Subject.doAsPrivileged methods.
+ *                              {@code Subject.doAsPrivileged} methods.
  *
  *      getSubject -            allow for the retrieval of the
  *                              Subject(s) associated with the
@@ -52,39 +52,39 @@
  *
  *      getSubjectFromDomainCombiner -  allow for the retrieval of the
  *                              Subject associated with the
- *                              a SubjectDomainCombiner.
+ *                              a {@code SubjectDomainCombiner}.
  *
  *      setReadOnly -           allow the caller to set a Subject
  *                              to be read-only.
  *
- *      modifyPrincipals -      allow the caller to modify the Set
+ *      modifyPrincipals -      allow the caller to modify the {@code Set}
  *                              of Principals associated with a
- *                              Subject
+ *                              {@code Subject}
  *
  *      modifyPublicCredentials - allow the caller to modify the
- *                              Set of public credentials
- *                              associated with a Subject
+ *                              {@code Set} of public credentials
+ *                              associated with a {@code Subject}
  *
  *      modifyPrivateCredentials - allow the caller to modify the
- *                              Set of private credentials
- *                              associated with a Subject
+ *                              {@code Set} of private credentials
+ *                              associated with a {@code Subject}
  *
- *      refreshCredential -     allow code to invoke the refresh
+ *      refreshCredential -     allow code to invoke the {@code refresh}
  *                              method on a credential which implements
- *                              the Refreshable interface.
+ *                              the {@code Refreshable} interface.
  *
- *      destroyCredential -     allow code to invoke the destroy
- *                              method on a credential object
- *                              which implements the Destroyable
+ *      destroyCredential -     allow code to invoke the {@code destroy}
+ *                              method on a credential {@code object}
+ *                              which implements the {@code Destroyable}
  *                              interface.
  *
  *      createLoginContext.{name} -  allow code to instantiate a
- *                              LoginContext with the
+ *                              {@code LoginContext} with the
  *                              specified name.  name
  *                              is used as the index into the installed login
- *                              Configuration
+ *                              {@code Configuration}
  *                              (that returned by
- *                              Configuration.getConfiguration()).
+ *                              {@code Configuration.getConfiguration()}).
  *                              name can be wildcarded (set to '*')
  *                              to allow for any name.
  *
@@ -93,7 +93,7 @@
  *
  *      createLoginConfiguration.{type} - allow code to obtain a Configuration
  *                              object via
- *                              Configuration.getInstance.
+ *                              {@code Configuration.getInstance}.
  *
  *      setLoginConfiguration - allow for the setting of the system-wide
  *                              login Configuration.
@@ -103,15 +103,15 @@
  * 
* *

The following target name has been deprecated in favor of - * createLoginContext.{name}. + * {@code createLoginContext.{name}}. * *

  *      createLoginContext -    allow code to instantiate a
- *                              LoginContext.
+ *                              {@code LoginContext}.
  * 
* - *

javax.security.auth.Policy has been - * deprecated in favor of java.security.Policy. + *

{@code javax.security.auth.Policy} has been + * deprecated in favor of {@code java.security.Policy}. * Therefore, the following target names have also been deprecated: * *

@@ -139,8 +139,8 @@
      *
      * @param name the name of the AuthPermission
      *
-     * @throws NullPointerException if name is null.
-     * @throws IllegalArgumentException if name is empty.
+     * @throws NullPointerException if {@code name} is {@code null}.
+     * @throws IllegalArgumentException if {@code name} is empty.
      */
     public AuthPermission(String name) {
         // for backwards compatibility --
@@ -160,8 +160,8 @@
      *
      * @param actions should be null.
      *
-     * @throws NullPointerException if name is null.
-     * @throws IllegalArgumentException if name is empty.
+     * @throws NullPointerException if {@code name} is {@code null}.
+     * @throws IllegalArgumentException if {@code name} is empty.
      */
     public AuthPermission(String name, String actions) {
         // for backwards compatibility --
diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/DestroyFailedException.java
--- a/jdk/src/share/classes/javax/security/auth/DestroyFailedException.java	Mon Jul 15 14:37:01 2013 -0700
+++ b/jdk/src/share/classes/javax/security/auth/DestroyFailedException.java	Tue Jul 16 12:19:41 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
 package javax.security.auth;
 
 /**
- * Signals that a destroy operation failed.
+ * Signals that a {@code destroy} operation failed.
  *
  * 

This exception is thrown by credentials implementing - * the Destroyable interface when the destroy + * the {@code Destroyable} interface when the {@code destroy} * method fails. * */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/Destroyable.java --- a/jdk/src/share/classes/javax/security/auth/Destroyable.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/Destroyable.java Tue Jul 16 12:19:41 2013 -0700 @@ -34,12 +34,12 @@ public interface Destroyable { /** - * Destroy this Object. + * Destroy this {@code Object}. * - *

Sensitive information associated with this Object + *

Sensitive information associated with this {@code Object} * is destroyed or cleared. Subsequent calls to certain methods - * on this Object will result in an - * IllegalStateException being thrown. + * on this {@code Object} will result in an + * {@code IllegalStateException} being thrown. * *

* The default implementation throws {@code DestroyFailedException}. @@ -47,19 +47,19 @@ * @exception DestroyFailedException if the destroy operation fails.

* * @exception SecurityException if the caller does not have permission - * to destroy this Object. + * to destroy this {@code Object}. */ public default void destroy() throws DestroyFailedException { throw new DestroyFailedException(); } /** - * Determine if this Object has been destroyed. + * Determine if this {@code Object} has been destroyed. * *

* The default implementation returns false. * - * @return true if this Object has been destroyed, + * @return true if this {@code Object} has been destroyed, * false otherwise. */ public default boolean isDestroyed() { diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/Policy.java --- a/jdk/src/share/classes/javax/security/auth/Policy.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/Policy.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,11 +32,11 @@ *

This is an abstract class for representing the system policy for * Subject-based authorization. A subclass implementation * of this class provides a means to specify a Subject-based - * access control Policy. + * access control {@code Policy}. * - *

A Policy object can be queried for the set of + *

A {@code Policy} object can be queried for the set of * Permissions granted to code running as a - * Principal in the following manner: + * {@code Principal} in the following manner: * *

  *      policy = Policy.getPolicy();
@@ -44,20 +44,20 @@
  *                                                      codeSource);
  * 
* - * The Policy object consults the local policy and returns - * and appropriate Permissions object with the + * The {@code Policy} object consults the local policy and returns + * and appropriate {@code Permissions} object with the * Permissions granted to the Principals associated with the * provided subject, and granted to the code specified * by the provided codeSource. * - *

A Policy contains the following information. + *

A {@code Policy} contains the following information. * Note that this example only represents the syntax for the default - * Policy implementation. Subclass implementations of this class + * {@code Policy} implementation. Subclass implementations of this class * may implement alternative syntaxes and may retrieve the - * Policy from any source such as files, databases, + * {@code Policy} from any source such as files, databases, * or servers. * - *

Each entry in the Policy is represented as + *

Each entry in the {@code Policy} is represented as * a grant entry. Each grant entry * specifies a codebase, code signers, and Principals triplet, * as well as the Permissions granted to that triplet. @@ -84,23 +84,23 @@ *

* * This grant entry specifies that code from "foo.com", - * signed by "foo', and running as a SolarisPrincipal with the - * name, duke, has one Permission. This Permission + * signed by "foo', and running as a {@code SolarisPrincipal} with the + * name, duke, has one {@code Permission}. This {@code Permission} * permits the executing code to read and write files in the directory, * "/home/duke". * - *

To "run" as a particular Principal, - * code invokes the Subject.doAs(subject, ...) method. + *

To "run" as a particular {@code Principal}, + * code invokes the {@code Subject.doAs(subject, ...)} method. * After invoking that method, the code runs as all the Principals - * associated with the specified Subject. - * Note that this Policy (and the Permissions - * granted in this Policy) only become effective - * after the call to Subject.doAs has occurred. + * associated with the specified {@code Subject}. + * Note that this {@code Policy} (and the Permissions + * granted in this {@code Policy}) only become effective + * after the call to {@code Subject.doAs} has occurred. * *

Multiple Principals may be listed within one grant entry. * All the Principals in the grant entry must be associated with - * the Subject provided to Subject.doAs - * for that Subject to be granted the specified Permissions. + * the {@code Subject} provided to {@code Subject.doAs} + * for that {@code Subject} to be granted the specified Permissions. * *

  *      grant Principal com.sun.security.auth.SolarisPrincipal "duke",
@@ -115,7 +115,7 @@
  * as well as permission to make socket connections to "duke.com".
  *
  * 

Note that non Principal-based grant entries are not permitted - * in this Policy. Therefore, grant entries such as: + * in this {@code Policy}. Therefore, grant entries such as: * *

  *      grant CodeBase "foo.com", Signedby "foo" {
@@ -124,7 +124,7 @@
  * 
* * are rejected. Such permission must be listed in the - * java.security.Policy. + * {@code java.security.Policy}. * *

The default {@code Policy} implementation can be changed by * setting the value of the {@code auth.policy.provider} security property to @@ -179,14 +179,14 @@ /** * Returns the installed Policy object. * This method first calls - * SecurityManager.checkPermission with the - * AuthPermission("getPolicy") permission + * {@code SecurityManager.checkPermission} with the + * {@code AuthPermission("getPolicy")} permission * to ensure the caller has permission to get the Policy object. * *

* * @return the installed Policy. The return value cannot be - * null. + * {@code null}. * * @exception java.lang.SecurityException if the current thread does not * have permission to get the Policy object. @@ -252,8 +252,8 @@ /** * Sets the system-wide Policy object. This method first calls - * SecurityManager.checkPermission with the - * AuthPermission("setPolicy") + * {@code SecurityManager.checkPermission} with the + * {@code AuthPermission("setPolicy")} * permission to ensure the caller has permission to set the Policy. * *

@@ -313,25 +313,25 @@ /** * Retrieve the Permissions granted to the Principals associated with - * the specified CodeSource. + * the specified {@code CodeSource}. * *

* - * @param subject the Subject + * @param subject the {@code Subject} * whose associated Principals, * in conjunction with the provided - * CodeSource, determines the Permissions + * {@code CodeSource}, determines the Permissions * returned by this method. This parameter - * may be null.

+ * may be {@code null}.

* - * @param cs the code specified by its CodeSource + * @param cs the code specified by its {@code CodeSource} * that determines, in conjunction with the provided - * Subject, the Permissions + * {@code Subject}, the Permissions * returned by this method. This parameter may be - * null. + * {@code null}. * * @return the Collection of Permissions granted to all the - * Subject and code specified in + * {@code Subject} and code specified in * the provided subject and cs * parameters. */ @@ -345,7 +345,7 @@ *

This method causes this object to refresh/reload its current * Policy. This is implementation-dependent. * For example, if the Policy object is stored in - * a file, calling refresh will cause the file to be re-read. + * a file, calling {@code refresh} will cause the file to be re-read. * *

* diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/PrivateCredentialPermission.java --- a/jdk/src/share/classes/javax/security/auth/PrivateCredentialPermission.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/PrivateCredentialPermission.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,10 +34,10 @@ /** * This class is used to protect access to private Credentials - * belonging to a particular Subject. The Subject + * belonging to a particular {@code Subject}. The {@code Subject} * is represented by a Set of Principals. * - *

The target name of this Permission specifies + *

The target name of this {@code Permission} specifies * a Credential class name, and a Set of Principals. * The only valid value for this Permission's actions is, "read". * The target name must abide by the following syntax: @@ -65,12 +65,12 @@ * * If CredentialClass is "*", then access is granted to * all private Credentials belonging to the specified - * Subject. + * {@code Subject}. * If "PrincipalName" is "*", then access is granted to the - * specified Credential owned by any Subject that has the - * specified Principal (the actual PrincipalName doesn't matter). + * specified Credential owned by any {@code Subject} that has the + * specified {@code Principal} (the actual PrincipalName doesn't matter). * For example, the following grants access to the - * a.b.Credential owned by any Subject that has + * a.b.Credential owned by any {@code Subject} that has * an a.b.Principal. * *

@@ -83,7 +83,7 @@
  *
  * If both the PrincipalClass and "PrincipalName" are "*",
  * then access is granted to the specified Credential owned by
- * any Subject.
+ * any {@code Subject}.
  *
  * 

In addition, the PrincipalClass/PrincipalName pairing may be repeated: * @@ -96,7 +96,7 @@ *

* * The above grants access to the private Credential, "a.b.Credential", - * belonging to a Subject with at least two associated Principals: + * belonging to a {@code Subject} with at least two associated Principals: * "a.b.Principal" with the name, "duke", and "c.d.Principal", with the name, * "dukette". * @@ -115,7 +115,7 @@ /** * @serial The Principals associated with this permission. * The set contains elements of type, - * PrivateCredentialPermission.CredOwner. + * {@code PrivateCredentialPermission.CredOwner}. */ private Set principals; // ignored - kept around for compatibility private transient CredOwner[] credOwners; @@ -126,8 +126,8 @@ private boolean testing = false; /** - * Create a new PrivateCredentialPermission - * with the specified credentialClass and Principals. + * Create a new {@code PrivateCredentialPermission} + * with the specified {@code credentialClass} and Principals. */ PrivateCredentialPermission(String credentialClass, Set principals) { @@ -153,19 +153,19 @@ } /** - * Creates a new PrivateCredentialPermission - * with the specified name. The name - * specifies both a Credential class and a Principal Set. + * Creates a new {@code PrivateCredentialPermission} + * with the specified {@code name}. The {@code name} + * specifies both a Credential class and a {@code Principal} Set. * *

* * @param name the name specifying the Credential class and - * Principal Set.

+ * {@code Principal} Set.

* * @param actions the actions specifying that the Credential can be read. * - * @throws IllegalArgumentException if name does not conform - * to the correct syntax or if actions is not "read". + * @throws IllegalArgumentException if {@code name} does not conform + * to the correct syntax or if {@code actions} is not "read". */ public PrivateCredentialPermission(String name, String actions) { super(name); @@ -178,34 +178,34 @@ /** * Returns the Class name of the Credential associated with this - * PrivateCredentialPermission. + * {@code PrivateCredentialPermission}. * *

* * @return the Class name of the Credential associated with this - * PrivateCredentialPermission. + * {@code PrivateCredentialPermission}. */ public String getCredentialClass() { return credentialClass; } /** - * Returns the Principal classes and names - * associated with this PrivateCredentialPermission. + * Returns the {@code Principal} classes and names + * associated with this {@code PrivateCredentialPermission}. * The information is returned as a two-dimensional array (array[x][y]). - * The 'x' value corresponds to the number of Principal + * The 'x' value corresponds to the number of {@code Principal} * class and name pairs. When (y==0), it corresponds to - * the Principal class value, and when (y==1), - * it corresponds to the Principal name value. + * the {@code Principal} class value, and when (y==1), + * it corresponds to the {@code Principal} name value. * For example, array[0][0] corresponds to the class name of - * the first Principal in the array. array[0][1] - * corresponds to the Principal name of the - * first Principal in the array. + * the first {@code Principal} in the array. array[0][1] + * corresponds to the {@code Principal} name of the + * first {@code Principal} in the array. * *

* - * @return the Principal class and names associated - * with this PrivateCredentialPermission. + * @return the {@code Principal} class and names associated + * with this {@code PrivateCredentialPermission}. */ public String[][] getPrincipals() { @@ -222,8 +222,8 @@ } /** - * Checks if this PrivateCredentialPermission implies - * the specified Permission. + * Checks if this {@code PrivateCredentialPermission} implies + * the specified {@code Permission}. * *

* @@ -241,10 +241,10 @@ * *

* - * @param p the Permission to check against. + * @param p the {@code Permission} to check against. * - * @return true if this PrivateCredentialPermission implies - * the specified Permission, false if not. + * @return true if this {@code PrivateCredentialPermission} implies + * the specified {@code Permission}, false if not. */ public boolean implies(Permission p) { @@ -260,9 +260,9 @@ } /** - * Checks two PrivateCredentialPermission objects for + * Checks two {@code PrivateCredentialPermission} objects for * equality. Checks that obj is a - * PrivateCredentialPermission, + * {@code PrivateCredentialPermission}, * and has the same credential class as this object, * as well as the same Principals as this object. * The order of the Principals in the respective Permission's @@ -272,7 +272,7 @@ * * @param obj the object we are testing for equality with this object. * - * @return true if obj is a PrivateCredentialPermission, + * @return true if obj is a {@code PrivateCredentialPermission}, * has the same credential class as this object, * and has the same Principals as this object. */ @@ -311,9 +311,9 @@ /** * Return a homogeneous collection of PrivateCredentialPermissions - * in a PermissionCollection. - * No such PermissionCollection is defined, - * so this method always returns null. + * in a {@code PermissionCollection}. + * No such {@code PermissionCollection} is defined, + * so this method always returns {@code null}. * *

* diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/RefreshFailedException.java --- a/jdk/src/share/classes/javax/security/auth/RefreshFailedException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/RefreshFailedException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,10 +26,10 @@ package javax.security.auth; /** - * Signals that a refresh operation failed. + * Signals that a {@code refresh} operation failed. * *

This exception is thrown by credentials implementing - * the Refreshable interface when the refresh + * the {@code Refreshable} interface when the {@code refresh} * method fails. * */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/Refreshable.java --- a/jdk/src/share/classes/javax/security/auth/Refreshable.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/Refreshable.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,24 +37,24 @@ public interface Refreshable { /** - * Determine if this Object is current. + * Determine if this {@code Object} is current. * *

* - * @return true if this Object is currently current, + * @return true if this {@code Object} is currently current, * false otherwise. */ boolean isCurrent(); /** * Update or extend the validity period for this - * Object. + * {@code Object}. * *

* * @exception SecurityException if the caller does not have permission * to update or extend the validity period for this - * Object.

+ * {@code Object}.

* * @exception RefreshFailedException if the refresh attempt failed. */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/Subject.java --- a/jdk/src/share/classes/javax/security/auth/Subject.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/Subject.java Tue Jul 16 12:19:41 2013 -0700 @@ -42,39 +42,39 @@ import sun.security.util.ResourcesMgr; /** - *

A Subject represents a grouping of related information + *

A {@code Subject} represents a grouping of related information * for a single entity, such as a person. * Such information includes the Subject's identities as well as * its security-related attributes * (passwords and cryptographic keys, for example). * *

Subjects may potentially have multiple identities. - * Each identity is represented as a Principal - * within the Subject. Principals simply bind names to a - * Subject. For example, a Subject that happens + * Each identity is represented as a {@code Principal} + * within the {@code Subject}. Principals simply bind names to a + * {@code Subject}. For example, a {@code Subject} that happens * to be a person, Alice, might have two Principals: * one which binds "Alice Bar", the name on her driver license, - * to the Subject, and another which binds, + * to the {@code Subject}, and another which binds, * "999-99-9999", the number on her student identification card, - * to the Subject. Both Principals refer to the same - * Subject even though each has a different name. + * to the {@code Subject}. Both Principals refer to the same + * {@code Subject} even though each has a different name. * - *

A Subject may also own security-related attributes, + *

A {@code Subject} may also own security-related attributes, * which are referred to as credentials. * Sensitive credentials that require special protection, such as * private cryptographic keys, are stored within a private credential - * Set. Credentials intended to be shared, such as + * {@code Set}. Credentials intended to be shared, such as * public key certificates or Kerberos server tickets are stored - * within a public credential Set. Different permissions + * within a public credential {@code Set}. Different permissions * are required to access and modify the different credential Sets. * - *

To retrieve all the Principals associated with a Subject, - * invoke the getPrincipals method. To retrieve - * all the public or private credentials belonging to a Subject, - * invoke the getPublicCredentials method or - * getPrivateCredentials method, respectively. - * To modify the returned Set of Principals and credentials, - * use the methods defined in the Set class. + *

To retrieve all the Principals associated with a {@code Subject}, + * invoke the {@code getPrincipals} method. To retrieve + * all the public or private credentials belonging to a {@code Subject}, + * invoke the {@code getPublicCredentials} method or + * {@code getPrivateCredentials} method, respectively. + * To modify the returned {@code Set} of Principals and credentials, + * use the methods defined in the {@code Set} class. * For example: *

  *      Subject subject;
@@ -86,13 +86,13 @@
  *      subject.getPublicCredentials().add(credential);
  * 
* - *

This Subject class implements Serializable. - * While the Principals associated with the Subject are serialized, - * the credentials associated with the Subject are not. - * Note that the java.security.Principal class - * does not implement Serializable. Therefore all concrete - * Principal implementations associated with Subjects - * must implement Serializable. + *

This {@code Subject} class implements {@code Serializable}. + * While the Principals associated with the {@code Subject} are serialized, + * the credentials associated with the {@code Subject} are not. + * Note that the {@code java.security.Principal} class + * does not implement {@code Serializable}. Therefore all concrete + * {@code Principal} implementations associated with Subjects + * must implement {@code Serializable}. * * @see java.security.Principal * @see java.security.DomainCombiner @@ -102,14 +102,14 @@ private static final long serialVersionUID = -8308522755600156056L; /** - * A Set that provides a view of all of this + * A {@code Set} that provides a view of all of this * Subject's Principals * *

* * @serial Each element in this set is a - * java.security.Principal. - * The set is a Subject.SecureSet. + * {@code java.security.Principal}. + * The set is a {@code Subject.SecureSet}. */ Set principals; @@ -135,21 +135,21 @@ = new ProtectionDomain[0]; /** - * Create an instance of a Subject - * with an empty Set of Principals and empty + * Create an instance of a {@code Subject} + * with an empty {@code Set} of Principals and empty * Sets of public and private credentials. * - *

The newly constructed Sets check whether this Subject + *

The newly constructed Sets check whether this {@code Subject} * has been set read-only before permitting subsequent modifications. * The newly created Sets also prevent illegal modifications * by ensuring that callers have sufficient permissions. * *

To modify the Principals Set, the caller must have - * AuthPermission("modifyPrincipals"). + * {@code AuthPermission("modifyPrincipals")}. * To modify the public credential Set, the caller must have - * AuthPermission("modifyPublicCredentials"). + * {@code AuthPermission("modifyPublicCredentials")}. * To modify the private credential Set, the caller must have - * AuthPermission("modifyPrivateCredentials"). + * {@code AuthPermission("modifyPrivateCredentials")}. */ public Subject() { @@ -162,39 +162,39 @@ } /** - * Create an instance of a Subject with + * Create an instance of a {@code Subject} with * Principals and credentials. * *

The Principals and credentials from the specified Sets * are copied into newly constructed Sets. - * These newly created Sets check whether this Subject + * These newly created Sets check whether this {@code Subject} * has been set read-only before permitting subsequent modifications. * The newly created Sets also prevent illegal modifications * by ensuring that callers have sufficient permissions. * *

To modify the Principals Set, the caller must have - * AuthPermission("modifyPrincipals"). + * {@code AuthPermission("modifyPrincipals")}. * To modify the public credential Set, the caller must have - * AuthPermission("modifyPublicCredentials"). + * {@code AuthPermission("modifyPublicCredentials")}. * To modify the private credential Set, the caller must have - * AuthPermission("modifyPrivateCredentials"). + * {@code AuthPermission("modifyPrivateCredentials")}. *

* - * @param readOnly true if the Subject is to be read-only, + * @param readOnly true if the {@code Subject} is to be read-only, * and false otherwise.

* - * @param principals the Set of Principals - * to be associated with this Subject.

+ * @param principals the {@code Set} of Principals + * to be associated with this {@code Subject}.

* - * @param pubCredentials the Set of public credentials - * to be associated with this Subject.

+ * @param pubCredentials the {@code Set} of public credentials + * to be associated with this {@code Subject}.

* - * @param privCredentials the Set of private credentials - * to be associated with this Subject. + * @param privCredentials the {@code Set} of private credentials + * to be associated with this {@code Subject}. * * @exception NullPointerException if the specified - * principals, pubCredentials, - * or privCredentials are null. + * {@code principals}, {@code pubCredentials}, + * or {@code privCredentials} are {@code null}. */ public Subject(boolean readOnly, Set principals, Set pubCredentials, Set privCredentials) @@ -216,24 +216,24 @@ } /** - * Set this Subject to be read-only. + * Set this {@code Subject} to be read-only. * *

Modifications (additions and removals) to this Subject's - * Principal Set and + * {@code Principal} {@code Set} and * credential Sets will be disallowed. - * The destroy operation on this Subject's credentials will + * The {@code destroy} operation on this Subject's credentials will * still be permitted. * - *

Subsequent attempts to modify the Subject's Principal + *

Subsequent attempts to modify the Subject's {@code Principal} * and credential Sets will result in an - * IllegalStateException being thrown. - * Also, once a Subject is read-only, + * {@code IllegalStateException} being thrown. + * Also, once a {@code Subject} is read-only, * it can not be reset to being writable again. * *

* * @exception SecurityException if the caller does not have permission - * to set this Subject to be read-only. + * to set this {@code Subject} to be read-only. */ public void setReadOnly() { java.lang.SecurityManager sm = System.getSecurityManager(); @@ -245,40 +245,40 @@ } /** - * Query whether this Subject is read-only. + * Query whether this {@code Subject} is read-only. * *

* - * @return true if this Subject is read-only, false otherwise. + * @return true if this {@code Subject} is read-only, false otherwise. */ public boolean isReadOnly() { return this.readOnly; } /** - * Get the Subject associated with the provided - * AccessControlContext. + * Get the {@code Subject} associated with the provided + * {@code AccessControlContext}. * - *

The AccessControlContext may contain many - * Subjects (from nested doAs calls). - * In this situation, the most recent Subject associated - * with the AccessControlContext is returned. + *

The {@code AccessControlContext} may contain many + * Subjects (from nested {@code doAs} calls). + * In this situation, the most recent {@code Subject} associated + * with the {@code AccessControlContext} is returned. * *

* - * @param acc the AccessControlContext from which to retrieve - * the Subject. + * @param acc the {@code AccessControlContext} from which to retrieve + * the {@code Subject}. * - * @return the Subject associated with the provided - * AccessControlContext, or null - * if no Subject is associated - * with the provided AccessControlContext. + * @return the {@code Subject} associated with the provided + * {@code AccessControlContext}, or {@code null} + * if no {@code Subject} is associated + * with the provided {@code AccessControlContext}. * * @exception SecurityException if the caller does not have permission - * to get the Subject.

+ * to get the {@code Subject}.

* * @exception NullPointerException if the provided - * AccessControlContext is null. + * {@code AccessControlContext} is {@code null}. */ public static Subject getSubject(final AccessControlContext acc) { @@ -306,36 +306,36 @@ } /** - * Perform work as a particular Subject. + * Perform work as a particular {@code Subject}. * *

This method first retrieves the current Thread's - * AccessControlContext via - * AccessController.getContext, - * and then instantiates a new AccessControlContext + * {@code AccessControlContext} via + * {@code AccessController.getContext}, + * and then instantiates a new {@code AccessControlContext} * using the retrieved context along with a new - * SubjectDomainCombiner (constructed using - * the provided Subject). - * Finally, this method invokes AccessController.doPrivileged, - * passing it the provided PrivilegedAction, - * as well as the newly constructed AccessControlContext. + * {@code SubjectDomainCombiner} (constructed using + * the provided {@code Subject}). + * Finally, this method invokes {@code AccessController.doPrivileged}, + * passing it the provided {@code PrivilegedAction}, + * as well as the newly constructed {@code AccessControlContext}. * *

* - * @param subject the Subject that the specified - * action will run as. This parameter - * may be null.

+ * @param subject the {@code Subject} that the specified + * {@code action} will run as. This parameter + * may be {@code null}.

* * @param the type of the value returned by the PrivilegedAction's * {@code run} method. * * @param action the code to be run as the specified - * Subject.

+ * {@code Subject}.

* * @return the value returned by the PrivilegedAction's - * run method. + * {@code run} method. * - * @exception NullPointerException if the PrivilegedAction - * is null.

+ * @exception NullPointerException if the {@code PrivilegedAction} + * is {@code null}.

* * @exception SecurityException if the caller does not have permission * to invoke this method. @@ -362,41 +362,41 @@ } /** - * Perform work as a particular Subject. + * Perform work as a particular {@code Subject}. * *

This method first retrieves the current Thread's - * AccessControlContext via - * AccessController.getContext, - * and then instantiates a new AccessControlContext + * {@code AccessControlContext} via + * {@code AccessController.getContext}, + * and then instantiates a new {@code AccessControlContext} * using the retrieved context along with a new - * SubjectDomainCombiner (constructed using - * the provided Subject). - * Finally, this method invokes AccessController.doPrivileged, - * passing it the provided PrivilegedExceptionAction, - * as well as the newly constructed AccessControlContext. + * {@code SubjectDomainCombiner} (constructed using + * the provided {@code Subject}). + * Finally, this method invokes {@code AccessController.doPrivileged}, + * passing it the provided {@code PrivilegedExceptionAction}, + * as well as the newly constructed {@code AccessControlContext}. * *

* - * @param subject the Subject that the specified - * action will run as. This parameter - * may be null.

+ * @param subject the {@code Subject} that the specified + * {@code action} will run as. This parameter + * may be {@code null}.

* * @param the type of the value returned by the * PrivilegedExceptionAction's {@code run} method. * * @param action the code to be run as the specified - * Subject.

+ * {@code Subject}.

* * @return the value returned by the - * PrivilegedExceptionAction's run method. + * PrivilegedExceptionAction's {@code run} method. * * @exception PrivilegedActionException if the - * PrivilegedExceptionAction.run + * {@code PrivilegedExceptionAction.run} * method throws a checked exception.

* * @exception NullPointerException if the specified - * PrivilegedExceptionAction is - * null.

+ * {@code PrivilegedExceptionAction} is + * {@code null}.

* * @exception SecurityException if the caller does not have permission * to invoke this method. @@ -424,36 +424,36 @@ } /** - * Perform privileged work as a particular Subject. + * Perform privileged work as a particular {@code Subject}. * - *

This method behaves exactly as Subject.doAs, + *

This method behaves exactly as {@code Subject.doAs}, * except that instead of retrieving the current Thread's - * AccessControlContext, it uses the provided - * AccessControlContext. If the provided - * AccessControlContext is null, - * this method instantiates a new AccessControlContext + * {@code AccessControlContext}, it uses the provided + * {@code AccessControlContext}. If the provided + * {@code AccessControlContext} is {@code null}, + * this method instantiates a new {@code AccessControlContext} * with an empty collection of ProtectionDomains. * *

* - * @param subject the Subject that the specified - * action will run as. This parameter - * may be null.

+ * @param subject the {@code Subject} that the specified + * {@code action} will run as. This parameter + * may be {@code null}.

* * @param the type of the value returned by the PrivilegedAction's * {@code run} method. * * @param action the code to be run as the specified - * Subject.

+ * {@code Subject}.

* - * @param acc the AccessControlContext to be tied to the + * @param acc the {@code AccessControlContext} to be tied to the * specified subject and action.

* * @return the value returned by the PrivilegedAction's - * run method. + * {@code run} method. * - * @exception NullPointerException if the PrivilegedAction - * is null.

+ * @exception NullPointerException if the {@code PrivilegedAction} + * is {@code null}.

* * @exception SecurityException if the caller does not have permission * to invoke this method. @@ -485,41 +485,41 @@ } /** - * Perform privileged work as a particular Subject. + * Perform privileged work as a particular {@code Subject}. * - *

This method behaves exactly as Subject.doAs, + *

This method behaves exactly as {@code Subject.doAs}, * except that instead of retrieving the current Thread's - * AccessControlContext, it uses the provided - * AccessControlContext. If the provided - * AccessControlContext is null, - * this method instantiates a new AccessControlContext + * {@code AccessControlContext}, it uses the provided + * {@code AccessControlContext}. If the provided + * {@code AccessControlContext} is {@code null}, + * this method instantiates a new {@code AccessControlContext} * with an empty collection of ProtectionDomains. * *

* - * @param subject the Subject that the specified - * action will run as. This parameter - * may be null.

+ * @param subject the {@code Subject} that the specified + * {@code action} will run as. This parameter + * may be {@code null}.

* * @param the type of the value returned by the * PrivilegedExceptionAction's {@code run} method. * * @param action the code to be run as the specified - * Subject.

+ * {@code Subject}.

* - * @param acc the AccessControlContext to be tied to the + * @param acc the {@code AccessControlContext} to be tied to the * specified subject and action.

* * @return the value returned by the - * PrivilegedExceptionAction's run method. + * PrivilegedExceptionAction's {@code run} method. * * @exception PrivilegedActionException if the - * PrivilegedExceptionAction.run + * {@code PrivilegedExceptionAction.run} * method throws a checked exception.

* * @exception NullPointerException if the specified - * PrivilegedExceptionAction is - * null.

+ * {@code PrivilegedExceptionAction} is + * {@code null}.

* * @exception SecurityException if the caller does not have permission * to invoke this method. @@ -568,19 +568,19 @@ } /** - * Return the Set of Principals associated with this - * Subject. Each Principal represents - * an identity for this Subject. + * Return the {@code Set} of Principals associated with this + * {@code Subject}. Each {@code Principal} represents + * an identity for this {@code Subject}. * - *

The returned Set is backed by this Subject's - * internal Principal Set. Any modification - * to the returned Set affects the internal - * Principal Set as well. + *

The returned {@code Set} is backed by this Subject's + * internal {@code Principal} {@code Set}. Any modification + * to the returned {@code Set} affects the internal + * {@code Principal} {@code Set} as well. * *

* - * @return The Set of Principals associated with this - * Subject. + * @return The {@code Set} of Principals associated with this + * {@code Subject}. */ public Set getPrincipals() { @@ -590,28 +590,28 @@ } /** - * Return a Set of Principals associated with this - * Subject that are instances or subclasses of the specified - * Class. + * Return a {@code Set} of Principals associated with this + * {@code Subject} that are instances or subclasses of the specified + * {@code Class}. * - *

The returned Set is not backed by this Subject's - * internal Principal Set. A new - * Set is created and returned for each method invocation. - * Modifications to the returned Set - * will not affect the internal Principal Set. + *

The returned {@code Set} is not backed by this Subject's + * internal {@code Principal} {@code Set}. A new + * {@code Set} is created and returned for each method invocation. + * Modifications to the returned {@code Set} + * will not affect the internal {@code Principal} {@code Set}. * *

* * @param the type of the class modeled by {@code c} * - * @param c the returned Set of Principals will all be + * @param c the returned {@code Set} of Principals will all be * instances of this class. * - * @return a Set of Principals that are instances of the - * specified Class. + * @return a {@code Set} of Principals that are instances of the + * specified {@code Class}. * - * @exception NullPointerException if the specified Class - * is null. + * @exception NullPointerException if the specified {@code Class} + * is {@code null}. */ public Set getPrincipals(Class c) { @@ -625,18 +625,18 @@ } /** - * Return the Set of public credentials held by this - * Subject. + * Return the {@code Set} of public credentials held by this + * {@code Subject}. * - *

The returned Set is backed by this Subject's - * internal public Credential Set. Any modification - * to the returned Set affects the internal public - * Credential Set as well. + *

The returned {@code Set} is backed by this Subject's + * internal public Credential {@code Set}. Any modification + * to the returned {@code Set} affects the internal public + * Credential {@code Set} as well. * *

* - * @return A Set of public credentials held by this - * Subject. + * @return A {@code Set} of public credentials held by this + * {@code Subject}. */ public Set getPublicCredentials() { @@ -646,29 +646,29 @@ } /** - * Return the Set of private credentials held by this - * Subject. + * Return the {@code Set} of private credentials held by this + * {@code Subject}. * - *

The returned Set is backed by this Subject's - * internal private Credential Set. Any modification - * to the returned Set affects the internal private - * Credential Set as well. + *

The returned {@code Set} is backed by this Subject's + * internal private Credential {@code Set}. Any modification + * to the returned {@code Set} affects the internal private + * Credential {@code Set} as well. * *

A caller requires permissions to access the Credentials - * in the returned Set, or to modify the - * Set itself. A SecurityException + * in the returned {@code Set}, or to modify the + * {@code Set} itself. A {@code SecurityException} * is thrown if the caller does not have the proper permissions. * - *

While iterating through the Set, - * a SecurityException is thrown + *

While iterating through the {@code Set}, + * a {@code SecurityException} is thrown * if the caller does not have permission to access a - * particular Credential. The Iterator - * is nevertheless advanced to next element in the Set. + * particular Credential. The {@code Iterator} + * is nevertheless advanced to next element in the {@code Set}. * *

* - * @return A Set of private credentials held by this - * Subject. + * @return A {@code Set} of private credentials held by this + * {@code Subject}. */ public Set getPrivateCredentials() { @@ -686,28 +686,28 @@ } /** - * Return a Set of public credentials associated with this - * Subject that are instances or subclasses of the specified - * Class. + * Return a {@code Set} of public credentials associated with this + * {@code Subject} that are instances or subclasses of the specified + * {@code Class}. * - *

The returned Set is not backed by this Subject's - * internal public Credential Set. A new - * Set is created and returned for each method invocation. - * Modifications to the returned Set - * will not affect the internal public Credential Set. + *

The returned {@code Set} is not backed by this Subject's + * internal public Credential {@code Set}. A new + * {@code Set} is created and returned for each method invocation. + * Modifications to the returned {@code Set} + * will not affect the internal public Credential {@code Set}. * *

* * @param the type of the class modeled by {@code c} * - * @param c the returned Set of public credentials will all be + * @param c the returned {@code Set} of public credentials will all be * instances of this class. * - * @return a Set of public credentials that are instances - * of the specified Class. + * @return a {@code Set} of public credentials that are instances + * of the specified {@code Class}. * - * @exception NullPointerException if the specified Class - * is null. + * @exception NullPointerException if the specified {@code Class} + * is {@code null}. */ public Set getPublicCredentials(Class c) { @@ -721,32 +721,32 @@ } /** - * Return a Set of private credentials associated with this - * Subject that are instances or subclasses of the specified - * Class. + * Return a {@code Set} of private credentials associated with this + * {@code Subject} that are instances or subclasses of the specified + * {@code Class}. * *

The caller must have permission to access all of the - * requested Credentials, or a SecurityException + * requested Credentials, or a {@code SecurityException} * will be thrown. * - *

The returned Set is not backed by this Subject's - * internal private Credential Set. A new - * Set is created and returned for each method invocation. - * Modifications to the returned Set - * will not affect the internal private Credential Set. + *

The returned {@code Set} is not backed by this Subject's + * internal private Credential {@code Set}. A new + * {@code Set} is created and returned for each method invocation. + * Modifications to the returned {@code Set} + * will not affect the internal private Credential {@code Set}. * *

* * @param the type of the class modeled by {@code c} * - * @param c the returned Set of private credentials will all be + * @param c the returned {@code Set} of private credentials will all be * instances of this class. * - * @return a Set of private credentials that are instances - * of the specified Class. + * @return a {@code Set} of private credentials that are instances + * of the specified {@code Class}. * - * @exception NullPointerException if the specified Class - * is null. + * @exception NullPointerException if the specified {@code Class} + * is {@code null}. */ public Set getPrivateCredentials(Class c) { @@ -768,25 +768,25 @@ } /** - * Compares the specified Object with this Subject + * Compares the specified Object with this {@code Subject} * for equality. Returns true if the given object is also a Subject - * and the two Subject instances are equivalent. - * More formally, two Subject instances are - * equal if their Principal and Credential + * and the two {@code Subject} instances are equivalent. + * More formally, two {@code Subject} instances are + * equal if their {@code Principal} and {@code Credential} * Sets are equal. * *

* * @param o Object to be compared for equality with this - * Subject. + * {@code Subject}. * * @return true if the specified Object is equal to this - * Subject. + * {@code Subject}. * * @exception SecurityException if the caller does not have permission - * to access the private credentials for this Subject, + * to access the private credentials for this {@code Subject}, * or if the caller does not have permission to access the - * private credentials for the provided Subject. + * private credentials for the provided {@code Subject}. */ public boolean equals(Object o) { @@ -833,11 +833,11 @@ } /** - * Return the String representation of this Subject. + * Return the String representation of this {@code Subject}. * *

* - * @return the String representation of this Subject. + * @return the String representation of this {@code Subject}. */ public String toString() { return toString(true); @@ -894,11 +894,11 @@ } /** - * Returns a hashcode for this Subject. + * Returns a hashcode for this {@code Subject}. * *

* - * @return a hashcode for this Subject. + * @return a hashcode for this {@code Subject}. * * @exception SecurityException if the caller does not have permission * to access this Subject's private credentials. @@ -910,10 +910,10 @@ * hashcodes of this Subject's Principals and credentials. * * If a particular credential was destroyed - * (credential.hashCode() throws an - * IllegalStateException), + * ({@code credential.hashCode()} throws an + * {@code IllegalStateException}), * the hashcode for that credential is derived via: - * credential.getClass().toString().hashCode(). + * {@code credential.getClass().toString().hashCode()}. */ int hashCode = 0; @@ -964,7 +964,7 @@ s.defaultReadObject(); - // The Credential Set is not serialized, but we do not + // The Credential {@code Set} is not serialized, but we do not // want the default deserialization routine to set it to null. this.pubCredentials = Collections.synchronizedSet (new SecureSet(this, PUB_CREDENTIAL_SET)); @@ -998,13 +998,13 @@ /** * @serial An integer identifying the type of objects contained - * in this set. If which == 1, + * in this set. If {@code which == 1}, * this is a Principal set and all the elements are - * of type java.security.Principal. - * If which == 2, this is a public credential - * set and all the elements are of type Object. - * If which == 3, this is a private credential - * set and all the elements are of type Object. + * of type {@code java.security.Principal}. + * If {@code which == 2}, this is a public credential + * set and all the elements are of type {@code Object}. + * If {@code which == 3}, this is a private credential + * set and all the elements are of type {@code Object}. */ private int which; @@ -1321,7 +1321,7 @@ } /** - * This class implements a Set which returns only + * This class implements a {@code Set} which returns only * members that are an instance of a specified Class. */ private class ClassSet extends AbstractSet { diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/SubjectDomainCombiner.java --- a/jdk/src/share/classes/javax/security/auth/SubjectDomainCombiner.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/SubjectDomainCombiner.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,9 +39,9 @@ import java.lang.ref.WeakReference; /** - * A SubjectDomainCombiner updates ProtectionDomains - * with Principals from the Subject associated with this - * SubjectDomainCombiner. + * A {@code SubjectDomainCombiner} updates ProtectionDomains + * with Principals from the {@code Subject} associated with this + * {@code SubjectDomainCombiner}. * */ public class SubjectDomainCombiner implements java.security.DomainCombiner { @@ -66,13 +66,13 @@ (useJavaxPolicy && cachePolicy()); /** - * Associate the provided Subject with this - * SubjectDomainCombiner. + * Associate the provided {@code Subject} with this + * {@code SubjectDomainCombiner}. * *

* - * @param subject the Subject to be associated with - * with this SubjectDomainCombiner. + * @param subject the {@code Subject} to be associated with + * with this {@code SubjectDomainCombiner}. */ public SubjectDomainCombiner(Subject subject) { this.subject = subject; @@ -85,19 +85,19 @@ } /** - * Get the Subject associated with this - * SubjectDomainCombiner. + * Get the {@code Subject} associated with this + * {@code SubjectDomainCombiner}. * *

* - * @return the Subject associated with this - * SubjectDomainCombiner, or null - * if no Subject is associated with this - * SubjectDomainCombiner. + * @return the {@code Subject} associated with this + * {@code SubjectDomainCombiner}, or {@code null} + * if no {@code Subject} is associated with this + * {@code SubjectDomainCombiner}. * * @exception SecurityException if the caller does not have permission - * to get the Subject associated with this - * SubjectDomainCombiner. + * to get the {@code Subject} associated with this + * {@code SubjectDomainCombiner}. */ public Subject getSubject() { java.lang.SecurityManager sm = System.getSecurityManager(); @@ -110,18 +110,18 @@ /** * Update the relevant ProtectionDomains with the Principals - * from the Subject associated with this - * SubjectDomainCombiner. + * from the {@code Subject} associated with this + * {@code SubjectDomainCombiner}. * - *

A new ProtectionDomain instance is created - * for each ProtectionDomain in the - * currentDomains array. Each new ProtectionDomain - * instance is created using the CodeSource, - * Permissions and ClassLoader - * from the corresponding ProtectionDomain in + *

A new {@code ProtectionDomain} instance is created + * for each {@code ProtectionDomain} in the + * currentDomains array. Each new {@code ProtectionDomain} + * instance is created using the {@code CodeSource}, + * {@code Permission}s and {@code ClassLoader} + * from the corresponding {@code ProtectionDomain} in * currentDomains, as well as with the Principals from - * the Subject associated with this - * SubjectDomainCombiner. + * the {@code Subject} associated with this + * {@code SubjectDomainCombiner}. * *

All of the newly instantiated ProtectionDomains are * combined into a new array. The ProtectionDomains from the @@ -136,23 +136,23 @@ * * @param currentDomains the ProtectionDomains associated with the * current execution Thread, up to the most recent - * privileged ProtectionDomain. + * privileged {@code ProtectionDomain}. * The ProtectionDomains are are listed in order of execution, - * with the most recently executing ProtectionDomain + * with the most recently executing {@code ProtectionDomain} * residing at the beginning of the array. This parameter may - * be null if the current execution Thread + * be {@code null} if the current execution Thread * has no associated ProtectionDomains.

* * @param assignedDomains the ProtectionDomains inherited from the * parent Thread, or the ProtectionDomains from the * privileged context, if a call to * AccessController.doPrivileged(..., context) - * had occurred This parameter may be null + * had occurred This parameter may be {@code null} * if there were no ProtectionDomains inherited from the * parent Thread, or from the privileged context. * * @return a new array consisting of the updated ProtectionDomains, - * or null. + * or {@code null}. */ public ProtectionDomain[] combine(ProtectionDomain[] currentDomains, ProtectionDomain[] assignedDomains) { diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/Callback.java --- a/jdk/src/share/classes/javax/security/auth/callback/Callback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/Callback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,14 +28,14 @@ /** *

Implementations of this interface are passed to a - * CallbackHandler, allowing underlying security services + * {@code CallbackHandler}, allowing underlying security services * the ability to interact with a calling application to retrieve specific * authentication data such as usernames and passwords, or to display * certain information, such as error and warning messages. * - *

Callback implementations do not retrieve or + *

{@code Callback} implementations do not retrieve or * display the information requested by underlying security services. - * Callback implementations simply provide the means + * {@code Callback} implementations simply provide the means * to pass such requests to applications, and for applications, * if appropriate, to return requested information back to the * underlying security services. diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/CallbackHandler.java --- a/jdk/src/share/classes/javax/security/auth/callback/CallbackHandler.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/CallbackHandler.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ package javax.security.auth.callback; /** - *

An application implements a CallbackHandler and passes + *

An application implements a {@code CallbackHandler} and passes * it to underlying security services so that they may interact with * the application to retrieve specific authentication data, * such as usernames and passwords, or to display certain information, @@ -40,12 +40,12 @@ * *

Underlying security services make requests for different types * of information by passing individual Callbacks to the - * CallbackHandler. The CallbackHandler + * {@code CallbackHandler}. The {@code CallbackHandler} * implementation decides how to retrieve and display information * depending on the Callbacks passed to it. For example, * if the underlying service needs a username and password to - * authenticate a user, it uses a NameCallback and - * PasswordCallback. The CallbackHandler + * authenticate a user, it uses a {@code NameCallback} and + * {@code PasswordCallback}. The {@code CallbackHandler} * can then choose to prompt for a username and password serially, * or to prompt for both in a single window. * @@ -54,10 +54,10 @@ * {@code auth.login.defaultCallbackHandler} security property. * *

If the security property is set to the fully qualified name of a - * CallbackHandler implementation class, - * then a LoginContext will load the specified - * CallbackHandler and pass it to the underlying LoginModules. - * The LoginContext only loads the default handler + * {@code CallbackHandler} implementation class, + * then a {@code LoginContext} will load the specified + * {@code CallbackHandler} and pass it to the underlying LoginModules. + * The {@code LoginContext} only loads the default handler * if it was not provided one. * *

All default handler implementations must provide a public @@ -71,11 +71,11 @@ *

Retrieve or display the information requested in the * provided Callbacks. * - *

The handle method implementation checks the - * instance(s) of the Callback object(s) passed in + *

The {@code handle} method implementation checks the + * instance(s) of the {@code Callback} object(s) passed in * to retrieve or display the requested information. * The following example is provided to help demonstrate what an - * handle method implementation might look like. + * {@code handle} method implementation might look like. * This example code is for guidance only. Many details, * including proper error handling, are left out for simplicity. * @@ -135,7 +135,7 @@ * } * } * - * @param callbacks an array of Callback objects provided + * @param callbacks an array of {@code Callback} objects provided * by an underlying security service which contains * the information requested to be retrieved or displayed. * @@ -143,7 +143,7 @@ * * @exception UnsupportedCallbackException if the implementation of this * method does not support one or more of the Callbacks - * specified in the callbacks parameter. + * specified in the {@code callbacks} parameter. */ void handle(Callback[] callbacks) throws java.io.IOException, UnsupportedCallbackException; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/ChoiceCallback.java --- a/jdk/src/share/classes/javax/security/auth/callback/ChoiceCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/ChoiceCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ /** *

Underlying security services instantiate and pass a - * ChoiceCallback to the handle - * method of a CallbackHandler to display a list of choices + * {@code ChoiceCallback} to the {@code handle} + * method of a {@code CallbackHandler} to display a list of choices * and to retrieve the selected choice(s). * * @see javax.security.auth.callback.CallbackHandler @@ -60,13 +60,13 @@ private boolean multipleSelectionsAllowed; /** * @serial the selected choices, represented as indexes into the - * choices list. + * {@code choices} list. * @since 1.4 */ private int[] selections; /** - * Construct a ChoiceCallback with a prompt, + * Construct a {@code ChoiceCallback} with a prompt, * a list of choices, a default choice, and a boolean specifying * whether or not multiple selections from the list of choices are allowed. * @@ -79,21 +79,21 @@ * @param defaultChoice the choice to be used as the default choice * when the list of choices are displayed. This value * is represented as an index into the - * choices array.

+ * {@code choices} array.

* * @param multipleSelectionsAllowed boolean specifying whether or * not multiple selections can be made from the * list of choices. * - * @exception IllegalArgumentException if prompt is null, - * if prompt has a length of 0, - * if choices is null, - * if choices has a length of 0, - * if any element from choices is null, - * if any element from choices - * has a length of 0 or if defaultChoice + * @exception IllegalArgumentException if {@code prompt} is null, + * if {@code prompt} has a length of 0, + * if {@code choices} is null, + * if {@code choices} has a length of 0, + * if any element from {@code choices} is null, + * if any element from {@code choices} + * has a length of 0 or if {@code defaultChoice} * does not fall within the array boundaries of - * choices. + * {@code choices}. */ public ChoiceCallback(String prompt, String[] choices, int defaultChoice, boolean multipleSelectionsAllowed) { @@ -142,7 +142,7 @@ *

* * @return the defaultChoice, represented as an index into - * the choices list. + * the {@code choices} list. */ public int getDefaultChoice() { return defaultChoice; @@ -150,7 +150,7 @@ /** * Get the boolean determining whether multiple selections from - * the choices list are allowed. + * the {@code choices} list are allowed. * *

* @@ -166,7 +166,7 @@ *

* * @param selection the selection represented as an index into the - * choices list. + * {@code choices} list. * * @see #getSelectedIndexes */ @@ -181,11 +181,11 @@ *

* * @param selections the selections represented as indexes into the - * choices list. + * {@code choices} list. * * @exception UnsupportedOperationException if multiple selections are * not allowed, as determined by - * allowMultipleSelections. + * {@code allowMultipleSelections}. * * @see #getSelectedIndexes */ @@ -201,7 +201,7 @@ *

* * @return the selected choices, represented as indexes into the - * choices list. + * {@code choices} list. * * @see #setSelectedIndexes */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/ConfirmationCallback.java --- a/jdk/src/share/classes/javax/security/auth/callback/ConfirmationCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/ConfirmationCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ /** *

Underlying security services instantiate and pass a - * ConfirmationCallback to the handle - * method of a CallbackHandler to ask for YES/NO, + * {@code ConfirmationCallback} to the {@code handle} + * method of a {@code CallbackHandler} to ask for YES/NO, * OK/CANCEL, YES/NO/CANCEL or other similar confirmations. * * @see javax.security.auth.callback.CallbackHandler @@ -40,9 +40,9 @@ /** * Unspecified option type. * - *

The getOptionType method returns this - * value if this ConfirmationCallback was instantiated - * with options instead of an optionType. + *

The {@code getOptionType} method returns this + * value if this {@code ConfirmationCallback} was instantiated + * with {@code options} instead of an {@code optionType}. */ public static final int UNSPECIFIED_OPTION = -1; @@ -50,9 +50,9 @@ * YES/NO confirmation option. * *

An underlying security service specifies this as the - * optionType to a ConfirmationCallback + * {@code optionType} to a {@code ConfirmationCallback} * constructor if it requires a confirmation which can be answered - * with either YES or NO. + * with either {@code YES} or {@code NO}. */ public static final int YES_NO_OPTION = 0; @@ -60,9 +60,9 @@ * YES/NO/CANCEL confirmation confirmation option. * *

An underlying security service specifies this as the - * optionType to a ConfirmationCallback + * {@code optionType} to a {@code ConfirmationCallback} * constructor if it requires a confirmation which can be answered - * with either YES, NO or CANCEL. + * with either {@code YES}, {@code NO} or {@code CANCEL}. */ public static final int YES_NO_CANCEL_OPTION = 1; @@ -70,45 +70,45 @@ * OK/CANCEL confirmation confirmation option. * *

An underlying security service specifies this as the - * optionType to a ConfirmationCallback + * {@code optionType} to a {@code ConfirmationCallback} * constructor if it requires a confirmation which can be answered - * with either OK or CANCEL. + * with either {@code OK} or {@code CANCEL}. */ public static final int OK_CANCEL_OPTION = 2; /** * YES option. * - *

If an optionType was specified to this - * ConfirmationCallback, this option may be specified as a - * defaultOption or returned as the selected index. + *

If an {@code optionType} was specified to this + * {@code ConfirmationCallback}, this option may be specified as a + * {@code defaultOption} or returned as the selected index. */ public static final int YES = 0; /** * NO option. * - *

If an optionType was specified to this - * ConfirmationCallback, this option may be specified as a - * defaultOption or returned as the selected index. + *

If an {@code optionType} was specified to this + * {@code ConfirmationCallback}, this option may be specified as a + * {@code defaultOption} or returned as the selected index. */ public static final int NO = 1; /** * CANCEL option. * - *

If an optionType was specified to this - * ConfirmationCallback, this option may be specified as a - * defaultOption or returned as the selected index. + *

If an {@code optionType} was specified to this + * {@code ConfirmationCallback}, this option may be specified as a + * {@code defaultOption} or returned as the selected index. */ public static final int CANCEL = 2; /** * OK option. * - *

If an optionType was specified to this - * ConfirmationCallback, this option may be specified as a - * defaultOption or returned as the selected index. + *

If an {@code optionType} was specified to this + * {@code ConfirmationCallback}, this option may be specified as a + * {@code defaultOption} or returned as the selected index. */ public static final int OK = 3; @@ -152,7 +152,7 @@ private int selection; /** - * Construct a ConfirmationCallback with a + * Construct a {@code ConfirmationCallback} with a * message type, an option type and a default option. * *

Underlying security services use this constructor if @@ -161,27 +161,27 @@ * *

* - * @param messageType the message type (INFORMATION, - * WARNING or ERROR).

+ * @param messageType the message type ({@code INFORMATION}, + * {@code WARNING} or {@code ERROR}).

* - * @param optionType the option type (YES_NO_OPTION, - * YES_NO_CANCEL_OPTION or - * OK_CANCEL_OPTION).

+ * @param optionType the option type ({@code YES_NO_OPTION}, + * {@code YES_NO_CANCEL_OPTION} or + * {@code OK_CANCEL_OPTION}).

* * @param defaultOption the default option - * from the provided optionType (YES, - * NO, CANCEL or - * OK). + * from the provided optionType ({@code YES}, + * {@code NO}, {@code CANCEL} or + * {@code OK}). * * @exception IllegalArgumentException if messageType is not either - * INFORMATION, WARNING, - * or ERROR, if optionType is not either - * YES_NO_OPTION, - * YES_NO_CANCEL_OPTION, or - * OK_CANCEL_OPTION, - * or if defaultOption + * {@code INFORMATION}, {@code WARNING}, + * or {@code ERROR}, if optionType is not either + * {@code YES_NO_OPTION}, + * {@code YES_NO_CANCEL_OPTION}, or + * {@code OK_CANCEL_OPTION}, + * or if {@code defaultOption} * does not correspond to one of the options in - * optionType. + * {@code optionType}. */ public ConfirmationCallback(int messageType, int optionType, int defaultOption) { @@ -212,35 +212,35 @@ } /** - * Construct a ConfirmationCallback with a + * Construct a {@code ConfirmationCallback} with a * message type, a list of options and a default option. * *

Underlying security services use this constructor if * they require a confirmation different from the available preset * confirmations provided (for example, CONTINUE/ABORT or STOP/GO). - * The confirmation options are listed in the options array, - * and are displayed by the CallbackHandler implementation + * The confirmation options are listed in the {@code options} array, + * and are displayed by the {@code CallbackHandler} implementation * in a manner consistent with the way preset options are displayed. * *

* - * @param messageType the message type (INFORMATION, - * WARNING or ERROR).

+ * @param messageType the message type ({@code INFORMATION}, + * {@code WARNING} or {@code ERROR}).

* * @param options the list of confirmation options.

* * @param defaultOption the default option, represented as an index - * into the options array. + * into the {@code options} array. * * @exception IllegalArgumentException if messageType is not either - * INFORMATION, WARNING, - * or ERROR, if options is null, - * if options has a length of 0, - * if any element from options is null, - * if any element from options - * has a length of 0, or if defaultOption + * {@code INFORMATION}, {@code WARNING}, + * or {@code ERROR}, if {@code options} is null, + * if {@code options} has a length of 0, + * if any element from {@code options} is null, + * if any element from {@code options} + * has a length of 0, or if {@code defaultOption} * does not lie within the array boundaries of - * options. + * {@code options}. */ public ConfirmationCallback(int messageType, String[] options, int defaultOption) { @@ -261,7 +261,7 @@ } /** - * Construct a ConfirmationCallback with a prompt, + * Construct a {@code ConfirmationCallback} with a prompt, * message type, an option type and a default option. * *

Underlying security services use this constructor if @@ -272,29 +272,29 @@ * * @param prompt the prompt used to describe the list of options.

* - * @param messageType the message type (INFORMATION, - * WARNING or ERROR).

+ * @param messageType the message type ({@code INFORMATION}, + * {@code WARNING} or {@code ERROR}).

* - * @param optionType the option type (YES_NO_OPTION, - * YES_NO_CANCEL_OPTION or - * OK_CANCEL_OPTION).

+ * @param optionType the option type ({@code YES_NO_OPTION}, + * {@code YES_NO_CANCEL_OPTION} or + * {@code OK_CANCEL_OPTION}).

* * @param defaultOption the default option - * from the provided optionType (YES, - * NO, CANCEL or - * OK). + * from the provided optionType ({@code YES}, + * {@code NO}, {@code CANCEL} or + * {@code OK}). * - * @exception IllegalArgumentException if prompt is null, - * if prompt has a length of 0, + * @exception IllegalArgumentException if {@code prompt} is null, + * if {@code prompt} has a length of 0, * if messageType is not either - * INFORMATION, WARNING, - * or ERROR, if optionType is not either - * YES_NO_OPTION, - * YES_NO_CANCEL_OPTION, or - * OK_CANCEL_OPTION, - * or if defaultOption + * {@code INFORMATION}, {@code WARNING}, + * or {@code ERROR}, if optionType is not either + * {@code YES_NO_OPTION}, + * {@code YES_NO_CANCEL_OPTION}, or + * {@code OK_CANCEL_OPTION}, + * or if {@code defaultOption} * does not correspond to one of the options in - * optionType. + * {@code optionType}. */ public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) { @@ -327,39 +327,39 @@ } /** - * Construct a ConfirmationCallback with a prompt, + * Construct a {@code ConfirmationCallback} with a prompt, * message type, a list of options and a default option. * *

Underlying security services use this constructor if * they require a confirmation different from the available preset * confirmations provided (for example, CONTINUE/ABORT or STOP/GO). - * The confirmation options are listed in the options array, - * and are displayed by the CallbackHandler implementation + * The confirmation options are listed in the {@code options} array, + * and are displayed by the {@code CallbackHandler} implementation * in a manner consistent with the way preset options are displayed. * *

* * @param prompt the prompt used to describe the list of options.

* - * @param messageType the message type (INFORMATION, - * WARNING or ERROR).

+ * @param messageType the message type ({@code INFORMATION}, + * {@code WARNING} or {@code ERROR}).

* * @param options the list of confirmation options.

* * @param defaultOption the default option, represented as an index - * into the options array. + * into the {@code options} array. * - * @exception IllegalArgumentException if prompt is null, - * if prompt has a length of 0, + * @exception IllegalArgumentException if {@code prompt} is null, + * if {@code prompt} has a length of 0, * if messageType is not either - * INFORMATION, WARNING, - * or ERROR, if options is null, - * if options has a length of 0, - * if any element from options is null, - * if any element from options - * has a length of 0, or if defaultOption + * {@code INFORMATION}, {@code WARNING}, + * or {@code ERROR}, if {@code options} is null, + * if {@code options} has a length of 0, + * if any element from {@code options} is null, + * if any element from {@code options} + * has a length of 0, or if {@code defaultOption} * does not lie within the array boundaries of - * options. + * {@code options}. */ public ConfirmationCallback(String prompt, int messageType, String[] options, int defaultOption) { @@ -386,8 +386,8 @@ * *

* - * @return the prompt, or null if this ConfirmationCallback - * was instantiated without a prompt. + * @return the prompt, or null if this {@code ConfirmationCallback} + * was instantiated without a {@code prompt}. */ public String getPrompt() { return prompt; @@ -398,8 +398,8 @@ * *

* - * @return the message type (INFORMATION, - * WARNING or ERROR). + * @return the message type ({@code INFORMATION}, + * {@code WARNING} or {@code ERROR}). */ public int getMessageType() { return messageType; @@ -408,20 +408,20 @@ /** * Get the option type. * - *

If this method returns UNSPECIFIED_OPTION, then this - * ConfirmationCallback was instantiated with - * options instead of an optionType. - * In this case, invoke the getOptions method + *

If this method returns {@code UNSPECIFIED_OPTION}, then this + * {@code ConfirmationCallback} was instantiated with + * {@code options} instead of an {@code optionType}. + * In this case, invoke the {@code getOptions} method * to determine which confirmation options to display. * *

* - * @return the option type (YES_NO_OPTION, - * YES_NO_CANCEL_OPTION or - * OK_CANCEL_OPTION), or - * UNSPECIFIED_OPTION if this - * ConfirmationCallback was instantiated with - * options instead of an optionType. + * @return the option type ({@code YES_NO_OPTION}, + * {@code YES_NO_CANCEL_OPTION} or + * {@code OK_CANCEL_OPTION}), or + * {@code UNSPECIFIED_OPTION} if this + * {@code ConfirmationCallback} was instantiated with + * {@code options} instead of an {@code optionType}. */ public int getOptionType() { return optionType; @@ -433,8 +433,8 @@ *

* * @return the list of confirmation options, or null if this - * ConfirmationCallback was instantiated with - * an optionType instead of options. + * {@code ConfirmationCallback} was instantiated with + * an {@code optionType} instead of {@code options}. */ public String[] getOptions() { return options; @@ -446,14 +446,14 @@ *

* * @return the default option, represented as - * YES, NO, OK or - * CANCEL if an optionType + * {@code YES}, {@code NO}, {@code OK} or + * {@code CANCEL} if an {@code optionType} * was specified to the constructor of this - * ConfirmationCallback. + * {@code ConfirmationCallback}. * Otherwise, this method returns the default option as * an index into the - * options array specified to the constructor - * of this ConfirmationCallback. + * {@code options} array specified to the constructor + * of this {@code ConfirmationCallback}. */ public int getDefaultOption() { return defaultOption; @@ -464,13 +464,13 @@ * *

* - * @param selection the selection represented as YES, - * NO, OK or CANCEL - * if an optionType was specified to the constructor - * of this ConfirmationCallback. + * @param selection the selection represented as {@code YES}, + * {@code NO}, {@code OK} or {@code CANCEL} + * if an {@code optionType} was specified to the constructor + * of this {@code ConfirmationCallback}. * Otherwise, the selection represents the index into the - * options array specified to the constructor - * of this ConfirmationCallback. + * {@code options} array specified to the constructor + * of this {@code ConfirmationCallback}. * * @see #getSelectedIndex */ @@ -484,14 +484,14 @@ *

* * @return the selected confirmation option represented as - * YES, NO, OK or - * CANCEL if an optionType + * {@code YES}, {@code NO}, {@code OK} or + * {@code CANCEL} if an {@code optionType} * was specified to the constructor of this - * ConfirmationCallback. + * {@code ConfirmationCallback}. * Otherwise, this method returns the selected confirmation * option as an index into the - * options array specified to the constructor - * of this ConfirmationCallback. + * {@code options} array specified to the constructor + * of this {@code ConfirmationCallback}. * * @see #setSelectedIndex */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/LanguageCallback.java --- a/jdk/src/share/classes/javax/security/auth/callback/LanguageCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/LanguageCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,8 @@ /** *

Underlying security services instantiate and pass a - * LanguageCallback to the handle - * method of a CallbackHandler to retrieve the Locale + * {@code LanguageCallback} to the {@code handle} + * method of a {@code CallbackHandler} to retrieve the {@code Locale} * used for localizing text. * * @see javax.security.auth.callback.CallbackHandler @@ -46,16 +46,16 @@ private Locale locale; /** - * Construct a LanguageCallback. + * Construct a {@code LanguageCallback}. */ public LanguageCallback() { } /** - * Set the retrieved Locale. + * Set the retrieved {@code Locale}. * *

* - * @param locale the retrieved Locale. + * @param locale the retrieved {@code Locale}. * * @see #getLocale */ @@ -64,12 +64,12 @@ } /** - * Get the retrieved Locale. + * Get the retrieved {@code Locale}. * *

* - * @return the retrieved Locale, or null - * if no Locale could be retrieved. + * @return the retrieved {@code Locale}, or null + * if no {@code Locale} could be retrieved. * * @see #setLocale */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/NameCallback.java --- a/jdk/src/share/classes/javax/security/auth/callback/NameCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/NameCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ /** *

Underlying security services instantiate and pass a - * NameCallback to the handle - * method of a CallbackHandler to retrieve name information. + * {@code NameCallback} to the {@code handle} + * method of a {@code CallbackHandler} to retrieve name information. * * @see javax.security.auth.callback.CallbackHandler */ @@ -53,14 +53,14 @@ private String inputName; /** - * Construct a NameCallback with a prompt. + * Construct a {@code NameCallback} with a prompt. * *

* * @param prompt the prompt used to request the name. * - * @exception IllegalArgumentException if prompt is null - * or if prompt has a length of 0. + * @exception IllegalArgumentException if {@code prompt} is null + * or if {@code prompt} has a length of 0. */ public NameCallback(String prompt) { if (prompt == null || prompt.length() == 0) @@ -69,7 +69,7 @@ } /** - * Construct a NameCallback with a prompt + * Construct a {@code NameCallback} with a prompt * and default name. * *

@@ -79,10 +79,10 @@ * @param defaultName the name to be used as the default name displayed * with the prompt. * - * @exception IllegalArgumentException if prompt is null, - * if prompt has a length of 0, - * if defaultName is null, - * or if defaultName has a length of 0. + * @exception IllegalArgumentException if {@code prompt} is null, + * if {@code prompt} has a length of 0, + * if {@code defaultName} is null, + * or if {@code defaultName} has a length of 0. */ public NameCallback(String prompt, String defaultName) { if (prompt == null || prompt.length() == 0 || @@ -109,8 +109,8 @@ * *

* - * @return the default name, or null if this NameCallback - * was not instantiated with a defaultName. + * @return the default name, or null if this {@code NameCallback} + * was not instantiated with a {@code defaultName}. */ public String getDefaultName() { return defaultName; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/PasswordCallback.java --- a/jdk/src/share/classes/javax/security/auth/callback/PasswordCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/PasswordCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ /** *

Underlying security services instantiate and pass a - * PasswordCallback to the handle - * method of a CallbackHandler to retrieve password information. + * {@code PasswordCallback} to the {@code handle} + * method of a {@code CallbackHandler} to retrieve password information. * * @see javax.security.auth.callback.CallbackHandler */ @@ -53,7 +53,7 @@ private char[] inputPassword; /** - * Construct a PasswordCallback with a prompt + * Construct a {@code PasswordCallback} with a prompt * and a boolean specifying whether the password should be displayed * as it is being typed. * @@ -64,8 +64,8 @@ * @param echoOn true if the password should be displayed * as it is being typed. * - * @exception IllegalArgumentException if prompt is null or - * if prompt has a length of 0. + * @exception IllegalArgumentException if {@code prompt} is null or + * if {@code prompt} has a length of 0. */ public PasswordCallback(String prompt, boolean echoOn) { if (prompt == null || prompt.length() == 0) diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/TextInputCallback.java --- a/jdk/src/share/classes/javax/security/auth/callback/TextInputCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/TextInputCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ /** *

Underlying security services instantiate and pass a - * TextInputCallback to the handle - * method of a CallbackHandler to retrieve generic text + * {@code TextInputCallback} to the {@code handle} + * method of a {@code CallbackHandler} to retrieve generic text * information. * * @see javax.security.auth.callback.CallbackHandler @@ -54,14 +54,14 @@ private String inputText; /** - * Construct a TextInputCallback with a prompt. + * Construct a {@code TextInputCallback} with a prompt. * *

* * @param prompt the prompt used to request the information. * - * @exception IllegalArgumentException if prompt is null - * or if prompt has a length of 0. + * @exception IllegalArgumentException if {@code prompt} is null + * or if {@code prompt} has a length of 0. */ public TextInputCallback(String prompt) { if (prompt == null || prompt.length() == 0) @@ -70,7 +70,7 @@ } /** - * Construct a TextInputCallback with a prompt + * Construct a {@code TextInputCallback} with a prompt * and default input value. * *

@@ -80,10 +80,10 @@ * @param defaultText the text to be used as the default text displayed * with the prompt. * - * @exception IllegalArgumentException if prompt is null, - * if prompt has a length of 0, - * if defaultText is null - * or if defaultText has a length of 0. + * @exception IllegalArgumentException if {@code prompt} is null, + * if {@code prompt} has a length of 0, + * if {@code defaultText} is null + * or if {@code defaultText} has a length of 0. */ public TextInputCallback(String prompt, String defaultText) { if (prompt == null || prompt.length() == 0 || @@ -110,8 +110,8 @@ * *

* - * @return the default text, or null if this TextInputCallback - * was not instantiated with defaultText. + * @return the default text, or null if this {@code TextInputCallback} + * was not instantiated with {@code defaultText}. */ public String getDefaultText() { return defaultText; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/TextOutputCallback.java --- a/jdk/src/share/classes/javax/security/auth/callback/TextOutputCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/TextOutputCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ /** *

Underlying security services instantiate and pass a - * TextOutputCallback to the handle - * method of a CallbackHandler to display information messages, + * {@code TextOutputCallback} to the {@code handle} + * method of a {@code CallbackHandler} to display information messages, * warning messages and error messages. * * @see javax.security.auth.callback.CallbackHandler @@ -61,16 +61,16 @@ * *

* - * @param messageType the message type (INFORMATION, - * WARNING or ERROR).

+ * @param messageType the message type ({@code INFORMATION}, + * {@code WARNING} or {@code ERROR}).

* * @param message the message to be displayed.

* - * @exception IllegalArgumentException if messageType - * is not either INFORMATION, - * WARNING or ERROR, - * if message is null, - * or if message has a length of 0. + * @exception IllegalArgumentException if {@code messageType} + * is not either {@code INFORMATION}, + * {@code WARNING} or {@code ERROR}, + * if {@code message} is null, + * or if {@code message} has a length of 0. */ public TextOutputCallback(int messageType, String message) { if ((messageType != INFORMATION && @@ -87,8 +87,8 @@ * *

* - * @return the message type (INFORMATION, - * WARNING or ERROR). + * @return the message type ({@code INFORMATION}, + * {@code WARNING} or {@code ERROR}). */ public int getMessageType() { return messageType; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java --- a/jdk/src/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,8 @@ package javax.security.auth.callback; /** - * Signals that a CallbackHandler does not - * recognize a particular Callback. + * Signals that a {@code CallbackHandler} does not + * recognize a particular {@code Callback}. * */ public class UnsupportedCallbackException extends Exception { @@ -40,12 +40,12 @@ private Callback callback; /** - * Constructs a UnsupportedCallbackException + * Constructs a {@code UnsupportedCallbackException} * with no detail message. * *

* - * @param callback the unrecognized Callback. + * @param callback the unrecognized {@code Callback}. */ public UnsupportedCallbackException(Callback callback) { super(); @@ -59,7 +59,7 @@ * *

* - * @param callback the unrecognized Callback.

+ * @param callback the unrecognized {@code Callback}.

* * @param msg the detail message. */ @@ -69,11 +69,11 @@ } /** - * Get the unrecognized Callback. + * Get the unrecognized {@code Callback}. * *

* - * @return the unrecognized Callback. + * @return the unrecognized {@code Callback}. */ public Callback getCallback() { return callback; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/auth/callback/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package provides the classes necessary for services + * to interact with applications in order to retrieve + * information (authentication data including usernames + * or passwords, for example) or to display information + * (error and warning messages, for example). + * + * @since JDK1.4 + */ +package javax.security.auth.callback; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/callback/package.html --- a/jdk/src/share/classes/javax/security/auth/callback/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ - - - - - - - - - This package provides the classes necessary for services - to interact with applications in order to retrieve - information (authentication data including usernames - or passwords, for example) or to display information - (error and warning messages, for example). - - - -@since JDK1.4 - - diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java --- a/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ * This class is used to restrict the usage of the Kerberos * delegation model, ie: forwardable and proxiable tickets. *

- * The target name of this Permission specifies a pair of + * The target name of this {@code Permission} specifies a pair of * kerberos service principals. The first is the subordinate service principal * being entrusted to use the TGT. The second service principal designates * the target service the subordinate service principal is to @@ -71,15 +71,15 @@ private transient String subordinate, service; /** - * Create a new DelegationPermission + * Create a new {@code DelegationPermission} * with the specified subordinate and target principals. * *

* * @param principals the name of the subordinate and target principals * - * @throws NullPointerException if principals is null. - * @throws IllegalArgumentException if principals is empty. + * @throws NullPointerException if {@code principals} is {@code null}. + * @throws IllegalArgumentException if {@code principals} is empty. */ public DelegationPermission(String principals) { super(principals); @@ -87,7 +87,7 @@ } /** - * Create a new DelegationPermission + * Create a new {@code DelegationPermission} * with the specified subordinate and target principals. *

* @@ -95,8 +95,8 @@ *

* @param actions should be null. * - * @throws NullPointerException if principals is null. - * @throws IllegalArgumentException if principals is empty. + * @throws NullPointerException if {@code principals} is {@code null}. + * @throws IllegalArgumentException if {@code principals} is empty. */ public DelegationPermission(String principals, String actions) { super(principals, actions); @@ -134,7 +134,7 @@ * Checks if this Kerberos delegation permission object "implies" the * specified permission. *

- * If none of the above are true, implies returns false. + * If none of the above are true, {@code implies} returns false. * @param p the permission to check against. * * @return true if the specified permission is implied by this object, diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/KerberosKey.java --- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosKey.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosKey.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -76,7 +76,7 @@ private int versionNum; /** - * KeyImpl is serialized by writing out the ASN1 Encoded bytes + * {@code KeyImpl} is serialized by writing out the ASN1 Encoded bytes * of the encryption key. * The ASN1 encoding is defined in RFC4120 and as follows: *

@@ -241,7 +241,7 @@
     /**
      * Returns a hashcode for this KerberosKey.
      *
-     * @return a hashCode() for the KerberosKey
+     * @return a hashCode() for the {@code KerberosKey}
      * @since 1.6
      */
     public int hashCode() {
@@ -260,8 +260,8 @@
     /**
      * Compares the specified Object with this KerberosKey for equality.
      * Returns true if the given object is also a
-     * KerberosKey and the two
-     * KerberosKey instances are equivalent.
+     * {@code KerberosKey} and the two
+     * {@code KerberosKey} instances are equivalent.
      *
      * @param other the Object to compare to
      * @return true if the specified object is equal to this KerberosKey,
diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java	Mon Jul 15 14:37:01 2013 -0700
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java	Tue Jul 16 12:19:41 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -181,11 +181,11 @@
     /**
      * Returns a hashcode for this principal. The hash code is defined to
      * be the result of the following  calculation:
-     * 

+     * 
{@code
      *  hashCode = getName().hashCode();
-     * 
+ * }
* - * @return a hashCode() for the KerberosPrincipal + * @return a hashCode() for the {@code KerberosPrincipal} */ public int hashCode() { return getName().hashCode(); @@ -194,11 +194,11 @@ /** * Compares the specified Object with this Principal for equality. * Returns true if the given object is also a - * KerberosPrincipal and the two - * KerberosPrincipal instances are equivalent. - * More formally two KerberosPrincipal instances are equal - * if the values returned by getName() are equal and the - * values returned by getNameType() are equal. + * {@code KerberosPrincipal} and the two + * {@code KerberosPrincipal} instances are equivalent. + * More formally two {@code KerberosPrincipal} instances are equal + * if the values returned by {@code getName()} are equal and the + * values returned by {@code getNameType()} are equal. * * @param other the Object to compare to * @return true if the Object passed in represents the same principal @@ -225,7 +225,7 @@ /** * Save the KerberosPrincipal object to a stream * - * @serialData this KerberosPrincipal is serialized + * @serialData this {@code KerberosPrincipal} is serialized * by writing out the PrincipalName and the * realm in their DER-encoded form as specified in Section 5.2.2 of * RFC4120. diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java --- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -103,7 +103,7 @@ private byte[] asn1Encoding; /** - *KeyImpl is serialized by writing out the ASN1 Encoded bytes + *{@code KeyImpl} is serialized by writing out the ASN1 Encoded bytes * of the encryption key. The ASN1 encoding is defined in RFC4120 and as * follows: *
@@ -667,7 +667,7 @@
     /**
      * Returns a hashcode for this KerberosTicket.
      *
-     * @return a hashCode() for the KerberosTicket
+     * @return a hashCode() for the {@code KerberosTicket}
      * @since 1.6
      */
     public int hashCode() {
@@ -704,8 +704,8 @@
     /**
      * Compares the specified Object with this KerberosTicket for equality.
      * Returns true if the given object is also a
-     * KerberosTicket and the two
-     * KerberosTicket instances are equivalent.
+     * {@code KerberosTicket} and the two
+     * {@code KerberosTicket} instances are equivalent.
      *
      * @param other the Object to compare to
      * @return true if the specified object is equal to this KerberosTicket,
diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/KeyImpl.java
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KeyImpl.java	Mon Jul 15 14:37:01 2013 -0700
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KeyImpl.java	Tue Jul 16 12:19:41 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -166,7 +166,7 @@
     }
 
     /**
-     * @serialData this KeyImpl is serialized by
+     * @serialData this {@code KeyImpl} is serialized by
      * writing out the ASN1 Encoded bytes of the encryption key.
      * The ASN1 encoding is defined in RFC4120 and as  follows:
      * EncryptionKey   ::= SEQUENCE {
diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java	Mon Jul 15 14:37:01 2013 -0700
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java	Tue Jul 16 12:19:41 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -312,7 +312,7 @@
     /**
      * Returns a hashcode for this KeyTab.
      *
-     * @return a hashCode() for the KeyTab
+     * @return a hashCode() for the {@code KeyTab}
      */
     public int hashCode() {
         return Objects.hash(file, princ, bound);
@@ -321,8 +321,8 @@
     /**
      * Compares the specified Object with this KeyTab for equality.
      * Returns true if the given object is also a
-     * KeyTab and the two
-     * KeyTab instances are equivalent.
+     * {@code KeyTab} and the two
+     * {@code KeyTab} instances are equivalent.
      *
      * @param other the Object to compare to
      * @return true if the specified object is equal to this KeyTab
diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java
--- a/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java	Mon Jul 15 14:37:01 2013 -0700
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java	Tue Jul 16 12:19:41 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@
  * used within.
  * 

* The service principal name is the canonical name of the - * KereberosPrincipal supplying the service, that is + * {@code KereberosPrincipal} supplying the service, that is * the KerberosPrincipal represents a Kerberos service * principal. This name is treated in a case sensitive manner. * An asterisk may appear by itself, to signify any service principal. @@ -135,9 +135,9 @@ // created and re-used in the getAction function. /** - * Create a new ServicePermission - * with the specified servicePrincipal - * and action. + * Create a new {@code ServicePermission} + * with the specified {@code servicePrincipal} + * and {@code action}. * * @param servicePrincipal the name of the service principal. * An asterisk may appear by itself, to signify any service principal. @@ -169,7 +169,7 @@ * Checks if this Kerberos service permission object "implies" the * specified permission. *

- * If none of the above are true, implies returns false. + * If none of the above are true, {@code implies} returns false. * @param p the permission to check against. * * @return true if the specified permission is implied by this object, diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/auth/kerberos/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package contains utility classes related to the Kerberos network + * authentication protocol. They do not provide much Kerberos support + * themselves.

+ * + * The Kerberos network authentication protocol is defined in + * RFC 4120. The Java + * platform contains support for the client side of Kerberos via the + * {@link org.ietf.jgss} package. There might also be + * a login module that implements + * {@link javax.security.auth.spi.LoginModule LoginModule} to authenticate + * Kerberos principals.

+ * + * You can provide the name of your default realm and Key Distribution + * Center (KDC) host for that realm using the system properties + * {@code java.security.krb5.realm} and {@code java.security.krb5.kdc}. + * Both properties must be set. + * Alternatively, the {@code java.security.krb5.conf} system property can + * be set to the location of an MIT style {@code krb5.conf} configuration + * file. If none of these system properties are set, the {@code krb5.conf} + * file is searched for in an implementation-specific manner. Typically, + * an implementation will first look for a {@code krb5.conf} file in + * {@code /lib/security} and failing that, in an OS-specific + * location.

+ * + * @since JDK1.4 + */ +package javax.security.auth.kerberos; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/kerberos/package.html --- a/jdk/src/share/classes/javax/security/auth/kerberos/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ - - - - - - - - - This package contains utility classes related to the Kerberos network - authentication protocol. They do not provide much Kerberos support - themselves.

- - The Kerberos network authentication protocol is defined in - RFC 4120. The Java - platform contains support for the client side of Kerberos via the - {@link org.ietf.jgss} package. There might also be - a login module that implements - {@link javax.security.auth.spi.LoginModule LoginModule} to authenticate - Kerberos principals.

- - You can provide the name of your default realm and Key Distribution - Center (KDC) host for that realm using the system properties - {@code java.security.krb5.realm} and {@code java.security.krb5.kdc}. - Both properties must be set. - Alternatively, the {@code java.security.krb5.conf} system property can - be set to the location of an MIT style {@code krb5.conf} configuration - file. If none of these system properties are set, the {@code krb5.conf} - file is searched for in an implementation-specific manner. Typically, - an implementation will first look for a {@code krb5.conf} file in - {@code /lib/security} and failing that, in an OS-specific - location.

- - -@since JDK1.4 - - diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/AccountExpiredException.java --- a/jdk/src/share/classes/javax/security/auth/login/AccountExpiredException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/login/AccountExpiredException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,9 +29,9 @@ * Signals that a user account has expired. * *

This exception is thrown by LoginModules when they determine - * that an account has expired. For example, a LoginModule, + * that an account has expired. For example, a {@code LoginModule}, * after successfully authenticating a user, may determine that the - * user's account has expired. In this case the LoginModule + * user's account has expired. In this case the {@code LoginModule} * throws this exception to notify the application. The application can * then take the appropriate steps to notify the user. * diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/AppConfigurationEntry.java --- a/jdk/src/share/classes/javax/security/auth/login/AppConfigurationEntry.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/login/AppConfigurationEntry.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,14 +29,14 @@ import java.util.Collections; /** - * This class represents a single LoginModule entry + * This class represents a single {@code LoginModule} entry * configured for the application specified in the - * getAppConfigurationEntry(String appName) - * method in the Configuration class. Each respective - * AppConfigurationEntry contains a LoginModule name, - * a control flag (specifying whether this LoginModule is + * {@code getAppConfigurationEntry(String appName)} + * method in the {@code Configuration} class. Each respective + * {@code AppConfigurationEntry} contains a {@code LoginModule} name, + * a control flag (specifying whether this {@code LoginModule} is * REQUIRED, REQUISITE, SUFFICIENT, or OPTIONAL), and LoginModule-specific - * options. Please refer to the Configuration class for + * options. Please refer to the {@code Configuration} class for * more information on the different control flags and their semantics. * * @see javax.security.auth.login.Configuration @@ -50,25 +50,25 @@ /** * Default constructor for this class. * - *

This entry represents a single LoginModule + *

This entry represents a single {@code LoginModule} * entry configured for the application specified in the - * getAppConfigurationEntry(String appName) - * method from the Configuration class. + * {@code getAppConfigurationEntry(String appName)} + * method from the {@code Configuration} class. * * @param loginModuleName String representing the class name of the - * LoginModule configured for the + * {@code LoginModule} configured for the * specified application.

* * @param controlFlag either REQUIRED, REQUISITE, SUFFICIENT, * or OPTIONAL.

* - * @param options the options configured for this LoginModule. + * @param options the options configured for this {@code LoginModule}. * - * @exception IllegalArgumentException if loginModuleName - * is null, if LoginModuleName - * has a length of 0, if controlFlag + * @exception IllegalArgumentException if {@code loginModuleName} + * is null, if {@code LoginModuleName} + * has a length of 0, if {@code controlFlag} * is not either REQUIRED, REQUISITE, SUFFICIENT - * or OPTIONAL, or if options is null. + * or OPTIONAL, or if {@code options} is null. */ public AppConfigurationEntry(String loginModuleName, LoginModuleControlFlag controlFlag, @@ -88,9 +88,9 @@ } /** - * Get the class name of the configured LoginModule. + * Get the class name of the configured {@code LoginModule}. * - * @return the class name of the configured LoginModule as + * @return the class name of the configured {@code LoginModule} as * a String. */ public String getLoginModuleName() { @@ -100,28 +100,28 @@ /** * Return the controlFlag * (either REQUIRED, REQUISITE, SUFFICIENT, or OPTIONAL) - * for this LoginModule. + * for this {@code LoginModule}. * * @return the controlFlag * (either REQUIRED, REQUISITE, SUFFICIENT, or OPTIONAL) - * for this LoginModule. + * for this {@code LoginModule}. */ public LoginModuleControlFlag getControlFlag() { return controlFlag; } /** - * Get the options configured for this LoginModule. + * Get the options configured for this {@code LoginModule}. * - * @return the options configured for this LoginModule - * as an unmodifiable Map. + * @return the options configured for this {@code LoginModule} + * as an unmodifiable {@code Map}. */ public Map getOptions() { return options; } /** - * This class represents whether or not a LoginModule + * This class represents whether or not a {@code LoginModule} * is REQUIRED, REQUISITE, SUFFICIENT or OPTIONAL. */ public static class LoginModuleControlFlag { @@ -129,25 +129,25 @@ private String controlFlag; /** - * Required LoginModule. + * Required {@code LoginModule}. */ public static final LoginModuleControlFlag REQUIRED = new LoginModuleControlFlag("required"); /** - * Requisite LoginModule. + * Requisite {@code LoginModule}. */ public static final LoginModuleControlFlag REQUISITE = new LoginModuleControlFlag("requisite"); /** - * Sufficient LoginModule. + * Sufficient {@code LoginModule}. */ public static final LoginModuleControlFlag SUFFICIENT = new LoginModuleControlFlag("sufficient"); /** - * Optional LoginModule. + * Optional {@code LoginModule}. */ public static final LoginModuleControlFlag OPTIONAL = new LoginModuleControlFlag("optional"); diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/Configuration.java --- a/jdk/src/share/classes/javax/security/auth/login/Configuration.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/login/Configuration.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,9 +49,9 @@ * *

A login configuration contains the following information. * Note that this example only represents the default syntax for the - * Configuration. Subclass implementations of this class + * {@code Configuration}. Subclass implementations of this class * may implement alternative syntaxes and may retrieve the - * Configuration from any source such as files, databases, + * {@code Configuration} from any source such as files, databases, * or servers. * *

@@ -70,9 +70,9 @@
  *      };
  * 
* - *

Each entry in the Configuration is indexed via an + *

Each entry in the {@code Configuration} is indexed via an * application name, Name, and contains a list of - * LoginModules configured for that application. Each LoginModule + * LoginModules configured for that application. Each {@code LoginModule} * is specified via its fully qualified class name. * Authentication proceeds down the module list in the exact order specified. * If an application does not have specific entry, @@ -83,55 +83,55 @@ * valid values for Flag and their respective semantics: * *

- *      1) Required     - The LoginModule is required to succeed.
+ *      1) Required     - The {@code LoginModule} is required to succeed.
  *                      If it succeeds or fails, authentication still continues
- *                      to proceed down the LoginModule list.
+ *                      to proceed down the {@code LoginModule} list.
  *
- *      2) Requisite    - The LoginModule is required to succeed.
+ *      2) Requisite    - The {@code LoginModule} is required to succeed.
  *                      If it succeeds, authentication continues down the
- *                      LoginModule list.  If it fails,
+ *                      {@code LoginModule} list.  If it fails,
  *                      control immediately returns to the application
  *                      (authentication does not proceed down the
- *                      LoginModule list).
+ *                      {@code LoginModule} list).
  *
- *      3) Sufficient   - The LoginModule is not required to
+ *      3) Sufficient   - The {@code LoginModule} is not required to
  *                      succeed.  If it does succeed, control immediately
  *                      returns to the application (authentication does not
- *                      proceed down the LoginModule list).
+ *                      proceed down the {@code LoginModule} list).
  *                      If it fails, authentication continues down the
- *                      LoginModule list.
+ *                      {@code LoginModule} list.
  *
- *      4) Optional     - The LoginModule is not required to
+ *      4) Optional     - The {@code LoginModule} is not required to
  *                      succeed.  If it succeeds or fails,
  *                      authentication still continues to proceed down the
- *                      LoginModule list.
+ *                      {@code LoginModule} list.
  * 
* *

The overall authentication succeeds only if all Required and * Requisite LoginModules succeed. If a Sufficient - * LoginModule is configured and succeeds, + * {@code LoginModule} is configured and succeeds, * then only the Required and Requisite LoginModules prior to - * that Sufficient LoginModule need to have succeeded for + * that Sufficient {@code LoginModule} need to have succeeded for * the overall authentication to succeed. If no Required or * Requisite LoginModules are configured for an application, * then at least one Sufficient or Optional - * LoginModule must succeed. + * {@code LoginModule} must succeed. * *

ModuleOptions is a space separated list of - * LoginModule-specific values which are passed directly to + * {@code LoginModule}-specific values which are passed directly to * the underlying LoginModules. Options are defined by the - * LoginModule itself, and control the behavior within it. - * For example, a LoginModule may define options to support + * {@code LoginModule} itself, and control the behavior within it. + * For example, a {@code LoginModule} may define options to support * debugging/testing capabilities. The correct way to specify options in the - * Configuration is by using the following key-value pairing: + * {@code Configuration} is by using the following key-value pairing: * debug="true". The key and value should be separated by an * 'equals' symbol, and the value should be surrounded by double quotes. * If a String in the form, ${system.property}, occurs in the value, * it will be expanded to the value of the system property. * Note that there is no limit to the number of - * options a LoginModule may define. + * options a {@code LoginModule} may define. * - *

The following represents an example Configuration entry + *

The following represents an example {@code Configuration} entry * based on the syntax above: * *

@@ -143,7 +143,7 @@
  * };
  * 
* - *

This Configuration specifies that an application named, + *

This {@code Configuration} specifies that an application named, * "Login", requires users to first authenticate to the * com.sun.security.auth.module.UnixLoginModule, which is * required to succeed. Even if the UnixLoginModule @@ -165,11 +165,11 @@ * *

There is only one Configuration object installed in the runtime at any * given time. A Configuration object can be installed by calling the - * setConfiguration method. The installed Configuration object - * can be obtained by calling the getConfiguration method. + * {@code setConfiguration} method. The installed Configuration object + * can be obtained by calling the {@code getConfiguration} method. * *

If no Configuration object has been installed in the runtime, a call to - * getConfiguration installs an instance of the default + * {@code getConfiguration} installs an instance of the default * Configuration implementation (a default subclass implementation of this * abstract class). * The default Configuration implementation can be changed by setting the value @@ -178,7 +178,7 @@ * *

Application code can directly subclass Configuration to provide a custom * implementation. In addition, an instance of a Configuration object can be - * constructed by invoking one of the getInstance factory methods + * constructed by invoking one of the {@code getInstance} factory methods * with a standard type. The default policy type is "JavaLoginConfig". * See the Configuration section in the @@ -222,7 +222,7 @@ *

* * @return the login Configuration. If a Configuration object was set - * via the Configuration.setConfiguration method, + * via the {@code Configuration.setConfiguration} method, * then that object is returned. Otherwise, a default * Configuration object is returned. * @@ -286,14 +286,14 @@ } /** - * Set the login Configuration. + * Set the login {@code Configuration}. * *

* - * @param configuration the new Configuration + * @param configuration the new {@code Configuration} * * @exception SecurityException if the current thread does not have - * Permission to set the Configuration. + * Permission to set the {@code Configuration}. * * @see #getConfiguration */ @@ -505,7 +505,7 @@ * Return the Provider of this Configuration. * *

This Configuration instance will only have a Provider if it - * was obtained via a call to Configuration.getInstance. + * was obtained via a call to {@code Configuration.getInstance}. * Otherwise this method returns null. * * @return the Provider of this Configuration, or null. @@ -520,7 +520,7 @@ * Return the type of this Configuration. * *

This Configuration instance will only have a type if it - * was obtained via a call to Configuration.getInstance. + * was obtained via a call to {@code Configuration.getInstance}. * Otherwise this method returns null. * * @return the type of this Configuration, or null. @@ -535,7 +535,7 @@ * Return Configuration parameters. * *

This Configuration instance will only have parameters if it - * was obtained via a call to Configuration.getInstance. + * was obtained via a call to {@code Configuration.getInstance}. * Otherwise this method returns null. * * @return Configuration parameters, or null. @@ -567,7 +567,7 @@ *

This method causes this Configuration object to refresh/reload its * contents in an implementation-dependent manner. * For example, if this Configuration object stores its entries in a file, - * calling refresh may cause the file to be re-read. + * calling {@code refresh} may cause the file to be re-read. * *

The default implementation of this method does nothing. * This method should be overridden if a refresh operation is supported diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/ConfigurationSpi.java --- a/jdk/src/share/classes/javax/security/auth/login/ConfigurationSpi.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/login/ConfigurationSpi.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,15 +28,15 @@ /** * This class defines the Service Provider Interface (SPI) - * for the Configuration class. + * for the {@code Configuration} class. * All the abstract methods in this class must be implemented by each * service provider who wishes to supply a Configuration implementation. * *

Subclass implementations of this abstract class must provide - * a public constructor that takes a Configuration.Parameters + * a public constructor that takes a {@code Configuration.Parameters} * object as an input parameter. This constructor also must throw * an IllegalArgumentException if it does not understand the - * Configuration.Parameters input. + * {@code Configuration.Parameters} input. * * * @since 1.6 @@ -62,7 +62,7 @@ *

This method causes this Configuration object to refresh/reload its * contents in an implementation-dependent manner. * For example, if this Configuration object stores its entries in a file, - * calling refresh may cause the file to be re-read. + * calling {@code refresh} may cause the file to be re-read. * *

The default implementation of this method does nothing. * This method should be overridden if a refresh operation is supported diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/CredentialExpiredException.java --- a/jdk/src/share/classes/javax/security/auth/login/CredentialExpiredException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/login/CredentialExpiredException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,14 +26,14 @@ package javax.security.auth.login; /** - * Signals that a Credential has expired. + * Signals that a {@code Credential} has expired. * *

This exception is thrown by LoginModules when they determine - * that a Credential has expired. - * For example, a LoginModule authenticating a user - * in its login method may determine that the user's + * that a {@code Credential} has expired. + * For example, a {@code LoginModule} authenticating a user + * in its {@code login} method may determine that the user's * password, although entered correctly, has expired. In this case - * the LoginModule throws this exception to notify + * the {@code LoginModule} throws this exception to notify * the application. The application can then take the appropriate * steps to assist the user in updating the password. * diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/FailedLoginException.java --- a/jdk/src/share/classes/javax/security/auth/login/FailedLoginException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/login/FailedLoginException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ * Signals that user authentication failed. * *

This exception is thrown by LoginModules if authentication failed. - * For example, a LoginModule throws this exception if + * For example, a {@code LoginModule} throws this exception if * the user entered an incorrect password. * */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/LoginContext.java --- a/jdk/src/share/classes/javax/security/auth/login/LoginContext.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/login/LoginContext.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,11 +41,11 @@ import sun.security.util.ResourcesMgr; /** - *

The LoginContext class describes the basic methods used + *

The {@code LoginContext} class describes the basic methods used * to authenticate Subjects and provides a way to develop an * application independent of the underlying authentication technology. - * A Configuration specifies the authentication technology, or - * LoginModule, to be used with a particular application. + * A {@code Configuration} specifies the authentication technology, or + * {@code LoginModule}, to be used with a particular application. * Different LoginModules can be plugged in under an application * without requiring any modifications to the application itself. * @@ -57,36 +57,36 @@ * LoginModule under an application. * *

A typical caller instantiates a LoginContext with - * a name and a CallbackHandler. + * a name and a {@code CallbackHandler}. * LoginContext uses the name as the index into a * Configuration to determine which LoginModules should be used, * and which ones must succeed in order for the overall authentication to - * succeed. The CallbackHandler is passed to the underlying + * succeed. The {@code CallbackHandler} is passed to the underlying * LoginModules so they may communicate and interact with users * (prompting for a username and password via a graphical user interface, * for example). * *

Once the caller has instantiated a LoginContext, - * it invokes the login method to authenticate - * a Subject. The login method invokes + * it invokes the {@code login} method to authenticate + * a {@code Subject}. The {@code login} method invokes * the configured modules to perform their respective types of authentication * (username/password, smart card pin verification, etc.). * Note that the LoginModules will not attempt authentication retries nor * introduce delays if the authentication fails. * Such tasks belong to the LoginContext caller. * - *

If the login method returns without + *

If the {@code login} method returns without * throwing an exception, then the overall authentication succeeded. * The caller can then retrieve * the newly authenticated Subject by invoking the - * getSubject method. Principals and Credentials associated + * {@code getSubject} method. Principals and Credentials associated * with the Subject may be retrieved by invoking the Subject's - * respective getPrincipals, getPublicCredentials, - * and getPrivateCredentials methods. + * respective {@code getPrincipals}, {@code getPublicCredentials}, + * and {@code getPrivateCredentials} methods. * *

To logout the Subject, the caller calls - * the logout method. As with the login - * method, this logout method invokes the logout + * the {@code logout} method. As with the {@code login} + * method, this {@code logout} method invokes the {@code logout} * method for the configured modules. * *

A LoginContext should not be used to authenticate @@ -96,14 +96,14 @@ *

The following documentation applies to all LoginContext constructors: *

    * - *
  1. Subject + *
  2. {@code Subject} *
      *
    • If the constructor has a Subject * input parameter, the LoginContext uses the caller-specified * Subject object. *

      - *

    • If the caller specifies a null Subject - * and a null value is permitted, + *
    • If the caller specifies a {@code null} Subject + * and a {@code null} value is permitted, * the LoginContext instantiates a new Subject. *

      *

    • If the constructor does not have a Subject @@ -111,14 +111,14 @@ *

      *

    * - *
  3. Configuration + *
  4. {@code Configuration} *
      *
    • If the constructor has a Configuration * input parameter and the caller specifies a non-null Configuration, * the LoginContext uses the caller-specified Configuration. *

      * If the constructor does not have a Configuration - * input parameter, or if the caller specifies a null + * input parameter, or if the caller specifies a {@code null} * Configuration object, the constructor uses the following call to * get the installed Configuration: *

      @@ -126,42 +126,42 @@
        * 
      * For both cases, * the name argument given to the constructor is passed to the - * Configuration.getAppConfigurationEntry method. + * {@code Configuration.getAppConfigurationEntry} method. * If the Configuration has no entries for the specified name, - * then the LoginContext calls - * getAppConfigurationEntry with the name, "other" + * then the {@code LoginContext} calls + * {@code getAppConfigurationEntry} with the name, "other" * (the default entry name). If there is no entry for "other", - * then a LoginException is thrown. + * then a {@code LoginException} is thrown. *

      *

    • When LoginContext uses the installed Configuration, the caller * requires the createLoginContext.name and possibly * createLoginContext.other AuthPermissions. Furthermore, the * LoginContext will invoke configured modules from within an - * AccessController.doPrivileged call so that modules that + * {@code AccessController.doPrivileged} call so that modules that * perform security-sensitive tasks (such as connecting to remote hosts, * and updating the Subject) will require the respective permissions, but * the callers of the LoginContext will not require those permissions. *

      *

    • When LoginContext uses a caller-specified Configuration, the caller * does not require any createLoginContext AuthPermission. The LoginContext - * saves the AccessControlContext for the caller, + * saves the {@code AccessControlContext} for the caller, * and invokes the configured modules from within an - * AccessController.doPrivileged call constrained by that context. + * {@code AccessController.doPrivileged} call constrained by that context. * This means the caller context (stored when the LoginContext was created) * must have sufficient permissions to perform any security-sensitive tasks * that the modules may perform. *

      *

    * - *
  5. CallbackHandler + *
  6. {@code CallbackHandler} *
      *
    • If the constructor has a CallbackHandler * input parameter, the LoginContext uses the caller-specified * CallbackHandler object. *

      *

    • If the constructor does not have a CallbackHandler - * input parameter, or if the caller specifies a null - * CallbackHandler object (and a null value is permitted), + * input parameter, or if the caller specifies a {@code null} + * CallbackHandler object (and a {@code null} value is permitted), * the LoginContext queries the * {@code auth.login.defaultCallbackHandler} security property for the * fully qualified class name of a default handler @@ -177,10 +177,10 @@ * then this LoginContext must wrap any * caller-specified or default CallbackHandler implementation * in a new CallbackHandler implementation - * whose handle method implementation invokes the - * specified CallbackHandler's handle method in a - * java.security.AccessController.doPrivileged call - * constrained by the caller's current AccessControlContext. + * whose {@code handle} method implementation invokes the + * specified CallbackHandler's {@code handle} method in a + * {@code java.security.AccessController.doPrivileged} call + * constrained by the caller's current {@code AccessControlContext}. *
    *
* @@ -317,14 +317,14 @@ } /** - * Instantiate a new LoginContext object with a name. + * Instantiate a new {@code LoginContext} object with a name. * * @param name the name used as the index into the - * Configuration. + * {@code Configuration}. * - * @exception LoginException if the caller-specified name - * does not appear in the Configuration - * and there is no Configuration entry + * @exception LoginException if the caller-specified {@code name} + * does not appear in the {@code Configuration} + * and there is no {@code Configuration} entry * for "other", or if the * auth.login.defaultCallbackHandler * security property was set, but the implementation @@ -343,21 +343,21 @@ } /** - * Instantiate a new LoginContext object with a name - * and a Subject object. + * Instantiate a new {@code LoginContext} object with a name + * and a {@code Subject} object. * *

* * @param name the name used as the index into the - * Configuration.

+ * {@code Configuration}.

* - * @param subject the Subject to authenticate. + * @param subject the {@code Subject} to authenticate. * - * @exception LoginException if the caller-specified name - * does not appear in the Configuration - * and there is no Configuration entry - * for "other", if the caller-specified subject - * is null, or if the + * @exception LoginException if the caller-specified {@code name} + * does not appear in the {@code Configuration} + * and there is no {@code Configuration} entry + * for "other", if the caller-specified {@code subject} + * is {@code null}, or if the * auth.login.defaultCallbackHandler * security property was set, but the implementation * class could not be loaded. @@ -381,22 +381,22 @@ } /** - * Instantiate a new LoginContext object with a name - * and a CallbackHandler object. + * Instantiate a new {@code LoginContext} object with a name + * and a {@code CallbackHandler} object. * *

* * @param name the name used as the index into the - * Configuration.

+ * {@code Configuration}.

* - * @param callbackHandler the CallbackHandler object used by + * @param callbackHandler the {@code CallbackHandler} object used by * LoginModules to communicate with the user. * - * @exception LoginException if the caller-specified name - * does not appear in the Configuration - * and there is no Configuration entry + * @exception LoginException if the caller-specified {@code name} + * does not appear in the {@code Configuration} + * and there is no {@code Configuration} entry * for "other", or if the caller-specified - * callbackHandler is null. + * {@code callbackHandler} is {@code null}. *

* @exception SecurityException if a SecurityManager is set and * the caller does not have @@ -417,27 +417,27 @@ } /** - * Instantiate a new LoginContext object with a name, - * a Subject to be authenticated, and a - * CallbackHandler object. + * Instantiate a new {@code LoginContext} object with a name, + * a {@code Subject} to be authenticated, and a + * {@code CallbackHandler} object. * *

* * @param name the name used as the index into the - * Configuration.

+ * {@code Configuration}.

* - * @param subject the Subject to authenticate.

+ * @param subject the {@code Subject} to authenticate.

* - * @param callbackHandler the CallbackHandler object used by + * @param callbackHandler the {@code CallbackHandler} object used by * LoginModules to communicate with the user. * - * @exception LoginException if the caller-specified name - * does not appear in the Configuration - * and there is no Configuration entry + * @exception LoginException if the caller-specified {@code name} + * does not appear in the {@code Configuration} + * and there is no {@code Configuration} entry * for "other", or if the caller-specified - * subject is null, + * {@code subject} is {@code null}, * or if the caller-specified - * callbackHandler is null. + * {@code callbackHandler} is {@code null}. *

* @exception SecurityException if a SecurityManager is set and * the caller does not have @@ -458,34 +458,34 @@ } /** - * Instantiate a new LoginContext object with a name, - * a Subject to be authenticated, - * a CallbackHandler object, and a login - * Configuration. + * Instantiate a new {@code LoginContext} object with a name, + * a {@code Subject} to be authenticated, + * a {@code CallbackHandler} object, and a login + * {@code Configuration}. * *

* * @param name the name used as the index into the caller-specified - * Configuration.

+ * {@code Configuration}.

* - * @param subject the Subject to authenticate, - * or null.

+ * @param subject the {@code Subject} to authenticate, + * or {@code null}.

* - * @param callbackHandler the CallbackHandler object used by - * LoginModules to communicate with the user, or null. + * @param callbackHandler the {@code CallbackHandler} object used by + * LoginModules to communicate with the user, or {@code null}. *

* - * @param config the Configuration that lists the + * @param config the {@code Configuration} that lists the * login modules to be called to perform the authentication, - * or null. + * or {@code null}. * - * @exception LoginException if the caller-specified name - * does not appear in the Configuration - * and there is no Configuration entry + * @exception LoginException if the caller-specified {@code name} + * does not appear in the {@code Configuration} + * and there is no {@code Configuration} entry * for "other". *

* @exception SecurityException if a SecurityManager is set, - * config is null, + * config is {@code null}, * and either the caller does not have * AuthPermission("createLoginContext.name"), * or if a configuration entry for name does not exist and @@ -522,46 +522,46 @@ /** * Perform the authentication. * - *

This method invokes the login method for each + *

This method invokes the {@code login} method for each * LoginModule configured for the name specified to the - * LoginContext constructor, as determined by the login - * Configuration. Each LoginModule + * {@code LoginContext} constructor, as determined by the login + * {@code Configuration}. Each {@code LoginModule} * then performs its respective type of authentication * (username/password, smart card pin verification, etc.). * *

This method completes a 2-phase authentication process by - * calling each configured LoginModule's commit method + * calling each configured LoginModule's {@code commit} method * if the overall authentication succeeded (the relevant REQUIRED, * REQUISITE, SUFFICIENT, and OPTIONAL LoginModules succeeded), - * or by calling each configured LoginModule's abort method + * or by calling each configured LoginModule's {@code abort} method * if the overall authentication failed. If authentication succeeded, - * each successful LoginModule's commit method associates - * the relevant Principals and Credentials with the Subject. - * If authentication failed, each LoginModule's abort method + * each successful LoginModule's {@code commit} method associates + * the relevant Principals and Credentials with the {@code Subject}. + * If authentication failed, each LoginModule's {@code abort} method * removes/destroys any previously stored state. * - *

If the commit phase of the authentication process + *

If the {@code commit} phase of the authentication process * fails, then the overall authentication fails and this method - * invokes the abort method for each configured - * LoginModule. + * invokes the {@code abort} method for each configured + * {@code LoginModule}. * - *

If the abort phase + *

If the {@code abort} phase * fails for any reason, then this method propagates the - * original exception thrown either during the login phase - * or the commit phase. In either case, the overall + * original exception thrown either during the {@code login} phase + * or the {@code commit} phase. In either case, the overall * authentication fails. * *

In the case where multiple LoginModules fail, * this method propagates the exception raised by the first - * LoginModule which failed. + * {@code LoginModule} which failed. * - *

Note that if this method enters the abort phase - * (either the login or commit phase failed), + *

Note that if this method enters the {@code abort} phase + * (either the {@code login} or {@code commit} phase failed), * this method invokes all LoginModules configured for the - * application regardless of their respective Configuration - * flag parameters. Essentially this means that Requisite - * and Sufficient semantics are ignored during the - * abort phase. This guarantees that proper cleanup + * application regardless of their respective {@code Configuration} + * flag parameters. Essentially this means that {@code Requisite} + * and {@code Sufficient} semantics are ignored during the + * {@code abort} phase. This guarantees that proper cleanup * and state restoration can take place. * *

@@ -602,19 +602,19 @@ } /** - * Logout the Subject. + * Logout the {@code Subject}. * - *

This method invokes the logout method for each - * LoginModule configured for this LoginContext. - * Each LoginModule performs its respective logout procedure + *

This method invokes the {@code logout} method for each + * {@code LoginModule} configured for this {@code LoginContext}. + * Each {@code LoginModule} performs its respective logout procedure * which may include removing/destroying - * Principal and Credential information - * from the Subject and state cleanup. + * {@code Principal} and {@code Credential} information + * from the {@code Subject} and state cleanup. * *

Note that this method invokes all LoginModules configured for the * application regardless of their respective - * Configuration flag parameters. Essentially this means - * that Requisite and Sufficient semantics are + * {@code Configuration} flag parameters. Essentially this means + * that {@code Requisite} and {@code Sufficient} semantics are * ignored for this method. This guarantees that proper cleanup * and state restoration can take place. * diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/auth/login/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package provides a pluggable authentication framework. + *

Package Specification

+ * + *
+ * + * @since 1.4 + */ +package javax.security.auth.login; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/login/package.html --- a/jdk/src/share/classes/javax/security/auth/login/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ - - - - - - - - - This package provides a pluggable authentication framework. -

Package Specification

- - - - - -@since 1.4 - - diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/auth/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package provides a framework for authentication and + * authorization. The framework allows + * authentication to be performed in pluggable fashion. Different + * authentication modules can be plugged under an application without + * requiring modifications to the application itself. The + * authorization component allows specification of access controls + * based on code location, code signers and code executors + * (Subjects). + * + * @since JDK1.4 + */ +package javax.security.auth; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/package.html --- a/jdk/src/share/classes/javax/security/auth/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ - - - - - - - - - This package provides a framework for authentication and - authorization. The framework allows - authentication to be performed in pluggable fashion. Different - authentication modules can be plugged under an application without - requiring modifications to the application itself. The - authorization component allows specification of access controls - based on code location, code signers and code executors - (Subjects). - - - - -@since JDK1.4 - - diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/spi/LoginModule.java --- a/jdk/src/share/classes/javax/security/auth/spi/LoginModule.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/spi/LoginModule.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,95 +32,95 @@ import java.util.Map; /** - *

LoginModule describes the interface + *

{@code LoginModule} describes the interface * implemented by authentication technology providers. LoginModules * are plugged in under applications to provide a particular type of * authentication. * - *

While applications write to the LoginContext API, + *

While applications write to the {@code LoginContext} API, * authentication technology providers implement the - * LoginModule interface. - * A Configuration specifies the LoginModule(s) + * {@code LoginModule} interface. + * A {@code Configuration} specifies the LoginModule(s) * to be used with a particular login application. Therefore different * LoginModules can be plugged in under the application without * requiring any modifications to the application itself. * - *

The LoginContext is responsible for reading the - * Configuration and instantiating the appropriate - * LoginModules. Each LoginModule is initialized with - * a Subject, a CallbackHandler, shared - * LoginModule state, and LoginModule-specific options. + *

The {@code LoginContext} is responsible for reading the + * {@code Configuration} and instantiating the appropriate + * LoginModules. Each {@code LoginModule} is initialized with + * a {@code Subject}, a {@code CallbackHandler}, shared + * {@code LoginModule} state, and LoginModule-specific options. * - * The Subject represents the - * Subject currently being authenticated and is updated + * The {@code Subject} represents the + * {@code Subject} currently being authenticated and is updated * with relevant Credentials if authentication succeeds. - * LoginModules use the CallbackHandler to - * communicate with users. The CallbackHandler may be + * LoginModules use the {@code CallbackHandler} to + * communicate with users. The {@code CallbackHandler} may be * used to prompt for usernames and passwords, for example. - * Note that the CallbackHandler may be null. LoginModules - * which absolutely require a CallbackHandler to authenticate - * the Subject may throw a LoginException. + * Note that the {@code CallbackHandler} may be null. LoginModules + * which absolutely require a {@code CallbackHandler} to authenticate + * the {@code Subject} may throw a {@code LoginException}. * LoginModules optionally use the shared state to share information * or data among themselves. * *

The LoginModule-specific options represent the options - * configured for this LoginModule by an administrator or user - * in the login Configuration. - * The options are defined by the LoginModule itself + * configured for this {@code LoginModule} by an administrator or user + * in the login {@code Configuration}. + * The options are defined by the {@code LoginModule} itself * and control the behavior within it. For example, a - * LoginModule may define options to support debugging/testing + * {@code LoginModule} may define options to support debugging/testing * capabilities. Options are defined using a key-value syntax, - * such as debug=true. The LoginModule - * stores the options as a Map so that the values may + * such as debug=true. The {@code LoginModule} + * stores the options as a {@code Map} so that the values may * be retrieved using the key. Note that there is no limit to the number - * of options a LoginModule chooses to define. + * of options a {@code LoginModule} chooses to define. * *

The calling application sees the authentication process as a single * operation. However, the authentication process within the - * LoginModule proceeds in two distinct phases. + * {@code LoginModule} proceeds in two distinct phases. * In the first phase, the LoginModule's - * login method gets invoked by the LoginContext's - * login method. The login - * method for the LoginModule then performs + * {@code login} method gets invoked by the LoginContext's + * {@code login} method. The {@code login} + * method for the {@code LoginModule} then performs * the actual authentication (prompt for and verify a password for example) * and saves its authentication status as private state - * information. Once finished, the LoginModule's login - * method either returns true (if it succeeded) or - * false (if it should be ignored), or throws a - * LoginException to specify a failure. - * In the failure case, the LoginModule must not retry the + * information. Once finished, the LoginModule's {@code login} + * method either returns {@code true} (if it succeeded) or + * {@code false} (if it should be ignored), or throws a + * {@code LoginException} to specify a failure. + * In the failure case, the {@code LoginModule} must not retry the * authentication or introduce delays. The responsibility of such tasks * belongs to the application. If the application attempts to retry - * the authentication, the LoginModule's login method will be + * the authentication, the LoginModule's {@code login} method will be * called again. * *

In the second phase, if the LoginContext's overall authentication * succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL - * LoginModules succeeded), then the commit - * method for the LoginModule gets invoked. - * The commit method for a LoginModule checks its + * LoginModules succeeded), then the {@code commit} + * method for the {@code LoginModule} gets invoked. + * The {@code commit} method for a {@code LoginModule} checks its * privately saved state to see if its own authentication succeeded. - * If the overall LoginContext authentication succeeded + * If the overall {@code LoginContext} authentication succeeded * and the LoginModule's own authentication succeeded, then the - * commit method associates the relevant + * {@code commit} method associates the relevant * Principals (authenticated identities) and Credentials (authentication data - * such as cryptographic keys) with the Subject - * located within the LoginModule. + * such as cryptographic keys) with the {@code Subject} + * located within the {@code LoginModule}. * *

If the LoginContext's overall authentication failed (the relevant * REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed), - * then the abort method for each LoginModule - * gets invoked. In this case, the LoginModule removes/destroys + * then the {@code abort} method for each {@code LoginModule} + * gets invoked. In this case, the {@code LoginModule} removes/destroys * any authentication state originally saved. * - *

Logging out a Subject involves only one phase. - * The LoginContext invokes the LoginModule's logout - * method. The logout method for the LoginModule + *

Logging out a {@code Subject} involves only one phase. + * The {@code LoginContext} invokes the LoginModule's {@code logout} + * method. The {@code logout} method for the {@code LoginModule} * then performs the logout procedures, such as removing Principals or - * Credentials from the Subject or logging session information. + * Credentials from the {@code Subject} or logging session information. * - *

A LoginModule implementation must have a constructor with - * no arguments. This allows classes which load the LoginModule + *

A {@code LoginModule} implementation must have a constructor with + * no arguments. This allows classes which load the {@code LoginModule} * to instantiate it. * * @see javax.security.auth.login.LoginContext @@ -131,38 +131,38 @@ /** * Initialize this LoginModule. * - *

This method is called by the LoginContext - * after this LoginModule has been instantiated. + *

This method is called by the {@code LoginContext} + * after this {@code LoginModule} has been instantiated. * The purpose of this method is to initialize this - * LoginModule with the relevant information. - * If this LoginModule does not understand - * any of the data stored in sharedState or - * options parameters, they can be ignored. + * {@code LoginModule} with the relevant information. + * If this {@code LoginModule} does not understand + * any of the data stored in {@code sharedState} or + * {@code options} parameters, they can be ignored. * *

* - * @param subject the Subject to be authenticated.

+ * @param subject the {@code Subject} to be authenticated.

* - * @param callbackHandler a CallbackHandler for communicating + * @param callbackHandler a {@code CallbackHandler} for communicating * with the end user (prompting for usernames and * passwords, for example).

* * @param sharedState state shared with other configured LoginModules.

* * @param options options specified in the login - * Configuration for this particular - * LoginModule. + * {@code Configuration} for this particular + * {@code LoginModule}. */ void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options); /** - * Method to authenticate a Subject (phase 1). + * Method to authenticate a {@code Subject} (phase 1). * *

The implementation of this method authenticates - * a Subject. For example, it may prompt for - * Subject information such + * a {@code Subject}. For example, it may prompt for + * {@code Subject} information such * as a username and password and then attempt to verify the password. * This method saves the result of the authentication attempt * as private state within the LoginModule. @@ -172,7 +172,7 @@ * @exception LoginException if the authentication fails * * @return true if the authentication succeeded, or false if this - * LoginModule should be ignored. + * {@code LoginModule} should be ignored. */ boolean login() throws LoginException; @@ -186,9 +186,9 @@ * *

If this LoginModule's own authentication attempt * succeeded (checked by retrieving the private state saved by the - * login method), then this method associates relevant - * Principals and Credentials with the Subject located in the - * LoginModule. If this LoginModule's own + * {@code login} method), then this method associates relevant + * Principals and Credentials with the {@code Subject} located in the + * {@code LoginModule}. If this LoginModule's own * authentication attempted failed, then this method removes/destroys * any state that was originally saved. * @@ -197,7 +197,7 @@ * @exception LoginException if the commit fails * * @return true if this method succeeded, or false if this - * LoginModule should be ignored. + * {@code LoginModule} should be ignored. */ boolean commit() throws LoginException; @@ -211,7 +211,7 @@ * *

If this LoginModule's own authentication attempt * succeeded (checked by retrieving the private state saved by the - * login method), then this method cleans up any state + * {@code login} method), then this method cleans up any state * that was originally saved. * *

@@ -219,12 +219,12 @@ * @exception LoginException if the abort fails * * @return true if this method succeeded, or false if this - * LoginModule should be ignored. + * {@code LoginModule} should be ignored. */ boolean abort() throws LoginException; /** - * Method which logs out a Subject. + * Method which logs out a {@code Subject}. * *

An implementation of this method might remove/destroy a Subject's * Principals and Credentials. @@ -234,7 +234,7 @@ * @exception LoginException if the logout fails * * @return true if this method succeeded, or false if this - * LoginModule should be ignored. + * {@code LoginModule} should be ignored. */ boolean logout() throws LoginException; } diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/spi/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/auth/spi/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package provides the interface to be used for + * implementing pluggable authentication modules. + * + * @since JDK1.4 + */ +package javax.security.auth.spi; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/spi/package.html --- a/jdk/src/share/classes/javax/security/auth/spi/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ - - - - - - - - - This package provides the interface to be used for - implementing pluggable authentication modules. - - -@since JDK1.4 - - diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/x500/X500Principal.java --- a/jdk/src/share/classes/javax/security/auth/x500/X500Principal.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/x500/X500Principal.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,8 +33,8 @@ import sun.security.util.*; /** - *

This class represents an X.500 Principal. - * X500Principals are represented by distinguished names such as + *

This class represents an X.500 {@code Principal}. + * {@code X500Principal}s are represented by distinguished names such as * "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US". * *

This class can be instantiated by using a string representation @@ -50,12 +50,12 @@ * RFC 3280: Internet X.509 * Public Key Infrastructure Certificate and CRL Profile. * - *

The string representation for this X500Principal - * can be obtained by calling the getName methods. + *

The string representation for this {@code X500Principal} + * can be obtained by calling the {@code getName} methods. * - *

Note that the getSubjectX500Principal and - * getIssuerX500Principal methods of - * X509Certificate return X500Principals representing the + *

Note that the {@code getSubjectX500Principal} and + * {@code getIssuerX500Principal} methods of + * {@code X509Certificate} return X500Principals representing the * issuer and subject fields of the certificate. * * @see java.security.cert.X509Certificate @@ -97,7 +97,7 @@ } /** - * Creates an X500Principal from a string representation of + * Creates an {@code X500Principal} from a string representation of * an X.500 distinguished name (ex: * "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"). * The distinguished name must be specified using the grammar defined in @@ -119,9 +119,9 @@ *

{@code numericoid = number 1*( DOT number ) } * * @param name an X.500 distinguished name in RFC 1779 or RFC 2253 format - * @exception NullPointerException if the name - * is null - * @exception IllegalArgumentException if the name + * @exception NullPointerException if the {@code name} + * is {@code null} + * @exception IllegalArgumentException if the {@code name} * is improperly specified */ public X500Principal(String name) { @@ -129,7 +129,7 @@ } /** - * Creates an X500Principal from a string representation of + * Creates an {@code X500Principal} from a string representation of * an X.500 distinguished name (ex: * "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"). * The distinguished name must be specified using the grammar defined in @@ -137,13 +137,13 @@ * *

This constructor recognizes the attribute type keywords specified * in {@link #X500Principal(String)} and also recognizes additional - * keywords that have entries in the keywordMap parameter. + * keywords that have entries in the {@code keywordMap} parameter. * Keyword entries in the keywordMap take precedence over the default - * keywords recognized by X500Principal(String). Keywords + * keywords recognized by {@code X500Principal(String)}. Keywords * MUST be specified in all upper-case, otherwise they will be ignored. * Improperly specified keywords are ignored; however if a keyword in the * name maps to an improperly specified Object Identifier (OID), an - * IllegalArgumentException is thrown. It is permissible to + * {@code IllegalArgumentException} is thrown. It is permissible to * have 2 different keywords that map to the same OID. * *

This implementation enforces a more restrictive OID syntax than @@ -157,11 +157,11 @@ * @param keywordMap an attribute type keyword map, where each key is a * keyword String that maps to a corresponding object identifier in String * form (a sequence of nonnegative integers separated by periods). The map - * may be empty but never null. - * @exception NullPointerException if name or - * keywordMap is null - * @exception IllegalArgumentException if the name is - * improperly specified or a keyword in the name maps to an + * may be empty but never {@code null}. + * @exception NullPointerException if {@code name} or + * {@code keywordMap} is {@code null} + * @exception IllegalArgumentException if the {@code name} is + * improperly specified or a keyword in the {@code name} maps to an * OID that is not in the correct form * @since 1.6 */ @@ -188,10 +188,10 @@ } /** - * Creates an X500Principal from a distinguished name in + * Creates an {@code X500Principal} from a distinguished name in * ASN.1 DER encoded form. The ASN.1 notation for this structure is as * follows. - *


+     * 
{@code
      * Name ::= CHOICE {
      *   RDNSequence }
      *
@@ -214,7 +214,7 @@
      *       universalString         UniversalString (SIZE (1..MAX)),
      *       utf8String              UTF8String (SIZE (1.. MAX)),
      *       bmpString               BMPString (SIZE (1..MAX)) }
-     * 
+ * }
* * @param name a byte array containing the distinguished name in ASN.1 * DER encoded form @@ -233,7 +233,7 @@ } /** - * Creates an X500Principal from an InputStream + * Creates an {@code X500Principal} from an {@code InputStream} * containing the distinguished name in ASN.1 DER encoded form. * The ASN.1 notation for this structure is supplied in the * documentation for @@ -242,11 +242,11 @@ *

The read position of the input stream is positioned * to the next available byte after the encoded distinguished name. * - * @param is an InputStream containing the distinguished + * @param is an {@code InputStream} containing the distinguished * name in ASN.1 DER encoded form * - * @exception NullPointerException if the InputStream - * is null + * @exception NullPointerException if the {@code InputStream} + * is {@code null} * @exception IllegalArgumentException if an encoding error occurs * (incorrect form for DN) */ @@ -284,9 +284,9 @@ * the format defined in RFC 2253. * *

This method is equivalent to calling - * getName(X500Principal.RFC2253). + * {@code getName(X500Principal.RFC2253)}. * - * @return the distinguished name of this X500Principal + * @return the distinguished name of this {@code X500Principal} */ public String getName() { return getName(X500Principal.RFC2253); @@ -338,9 +338,9 @@ * those which section 2.4 of RFC 2253 states must be escaped * (they are escaped using a preceding backslash character) *

  • The entire name is converted to upper case - * using String.toUpperCase(Locale.US) + * using {@code String.toUpperCase(Locale.US)} *
  • The entire name is converted to lower case - * using String.toLowerCase(Locale.US) + * using {@code String.toLowerCase(Locale.US)} *
  • The name is finally normalized using normalization form KD, * as described in the Unicode Standard and UAX #15 * @@ -349,7 +349,7 @@ * * @param format the format to use * - * @return a string representation of this X500Principal + * @return a string representation of this {@code X500Principal} * using the specified format * @throws IllegalArgumentException if the specified format is invalid * or null @@ -371,16 +371,16 @@ * Returns a string representation of the X.500 distinguished name * using the specified format. Valid values for the format are * "RFC1779" and "RFC2253" (case insensitive). "CANONICAL" is not - * permitted and an IllegalArgumentException will be thrown. + * permitted and an {@code IllegalArgumentException} will be thrown. * *

    This method returns Strings in the format as specified in * {@link #getName(String)} and also emits additional attribute type - * keywords for OIDs that have entries in the oidMap + * keywords for OIDs that have entries in the {@code oidMap} * parameter. OID entries in the oidMap take precedence over the default - * OIDs recognized by getName(String). + * OIDs recognized by {@code getName(String)}. * Improperly specified OIDs are ignored; however if an OID * in the name maps to an improperly specified keyword, an - * IllegalArgumentException is thrown. + * {@code IllegalArgumentException} is thrown. * *

    Additional standard formats may be introduced in the future. * @@ -393,12 +393,12 @@ * @param oidMap an OID map, where each key is an object identifier in * String form (a sequence of nonnegative integers separated by periods) * that maps to a corresponding attribute type keyword String. - * The map may be empty but never null. - * @return a string representation of this X500Principal + * The map may be empty but never {@code null}. + * @return a string representation of this {@code X500Principal} * using the specified format * @throws IllegalArgumentException if the specified format is invalid, * null, or an OID in the name maps to an improperly specified keyword - * @throws NullPointerException if oidMap is null + * @throws NullPointerException if {@code oidMap} is {@code null} * @since 1.6 */ public String getName(String format, Map oidMap) { @@ -438,31 +438,31 @@ /** * Return a user-friendly string representation of this - * X500Principal. + * {@code X500Principal}. * - * @return a string representation of this X500Principal + * @return a string representation of this {@code X500Principal} */ public String toString() { return thisX500Name.toString(); } /** - * Compares the specified Object with this - * X500Principal for equality. + * Compares the specified {@code Object} with this + * {@code X500Principal} for equality. * - *

    Specifically, this method returns true if - * the Object o is an X500Principal + *

    Specifically, this method returns {@code true} if + * the {@code Object} o is an {@code X500Principal} * and if the respective canonical string representations - * (obtained via the getName(X500Principal.CANONICAL) method) + * (obtained via the {@code getName(X500Principal.CANONICAL)} method) * of this object and o are equal. * *

    This implementation is compliant with the requirements of RFC 3280. * * @param o Object to be compared for equality with this - * X500Principal + * {@code X500Principal} * - * @return true if the specified Object is equal - * to this X500Principal, false otherwise + * @return {@code true} if the specified {@code Object} is equal + * to this {@code X500Principal}, {@code false} otherwise */ public boolean equals(Object o) { if (this == o) { @@ -476,12 +476,12 @@ } /** - * Return a hash code for this X500Principal. + * Return a hash code for this {@code X500Principal}. * *

    The hash code is calculated via: - * getName(X500Principal.CANONICAL).hashCode() + * {@code getName(X500Principal.CANONICAL).hashCode()} * - * @return a hash code for this X500Principal + * @return a hash code for this {@code X500Principal} */ public int hashCode() { return thisX500Name.hashCode(); @@ -490,9 +490,9 @@ /** * Save the X500Principal object to a stream. * - * @serialData this X500Principal is serialized + * @serialData this {@code X500Principal} is serialized * by writing out its DER-encoded form - * (the value of getEncoded is serialized). + * (the value of {@code getEncoded} is serialized). */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/x500/X500PrivateCredential.java --- a/jdk/src/share/classes/javax/security/auth/x500/X500PrivateCredential.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/auth/x500/X500PrivateCredential.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ import javax.security.auth.Destroyable; /** - *

    This class represents an X500PrivateCredential. + *

    This class represents an {@code X500PrivateCredential}. * It associates an X.509 certificate, corresponding private key and the * KeyStore alias used to reference that exact key pair in the KeyStore. * This enables looking up the private credentials for an X.500 principal @@ -48,8 +48,8 @@ *

    * @param cert X509Certificate * @param key PrivateKey for the certificate - * @exception IllegalArgumentException if either cert or - * key is null + * @exception IllegalArgumentException if either {@code cert} or + * {@code key} is null * */ @@ -68,8 +68,8 @@ * @param cert X509Certificate * @param key PrivateKey for the certificate * @param alias KeyStore alias - * @exception IllegalArgumentException if either cert, - * key or alias is null + * @exception IllegalArgumentException if either {@code cert}, + * {@code key} or {@code alias} is null * */ public X500PrivateCredential(X509Certificate cert, PrivateKey key, diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/x500/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/auth/x500/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package contains the classes that should be used to store + * X500 Principal and X500 Private Credentials in a + * Subject. + * + *

    Package Specification

    + * + * + * + * @since JDK1.4 + */ +package javax.security.auth.x500; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/auth/x500/package.html --- a/jdk/src/share/classes/javax/security/auth/x500/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ - - - - - - - - - This package contains the classes that should be used to store - X500 Principal and X500 Private Credentials in a - Subject. - -

    Package Specification

    - - - - - -@since JDK1.4 - - diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/Certificate.java --- a/jdk/src/share/classes/javax/security/cert/Certificate.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/cert/Certificate.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,11 +49,11 @@ * sets of information, and they store and retrieve the information in * different ways. * - *

    Note: The classes in the package javax.security.cert + *

    Note: The classes in the package {@code javax.security.cert} * exist for compatibility with earlier versions of the * Java Secure Sockets Extension (JSSE). New applications should instead * use the standard Java SE certificate classes located in - * java.security.cert.

    + * {@code java.security.cert}.

    * * @since 1.4 * @see X509Certificate @@ -64,8 +64,8 @@ /** * Compares this certificate for equality with the specified - * object. If the other object is an - * instanceof Certificate, then + * object. If the {@code other} object is an + * {@code instanceof} {@code Certificate}, then * its encoded form is retrieved and compared with the * encoded form of this certificate. * diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/CertificateEncodingException.java --- a/jdk/src/share/classes/javax/security/cert/CertificateEncodingException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/cert/CertificateEncodingException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,11 +30,11 @@ * Certificate Encoding Exception. This is thrown whenever an error * occurs whilst attempting to encode a certificate. * - *

    Note: The classes in the package javax.security.cert + *

    Note: The classes in the package {@code javax.security.cert} * exist for compatibility with earlier versions of the * Java Secure Sockets Extension (JSSE). New applications should instead * use the standard Java SE certificate classes located in - * java.security.cert.

    + * {@code java.security.cert}.

    * * @since 1.4 * @author Hemma Prafullchandra diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/CertificateException.java --- a/jdk/src/share/classes/javax/security/cert/CertificateException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/cert/CertificateException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,11 +29,11 @@ /** * This exception indicates one of a variety of certificate problems. * - *

    Note: The classes in the package javax.security.cert + *

    Note: The classes in the package {@code javax.security.cert} * exist for compatibility with earlier versions of the * Java Secure Sockets Extension (JSSE). New applications should instead * use the standard Java SE certificate classes located in - * java.security.cert.

    + * {@code java.security.cert}.

    * * @author Hemma Prafullchandra * @since 1.4 diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/CertificateExpiredException.java --- a/jdk/src/share/classes/javax/security/cert/CertificateExpiredException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/cert/CertificateExpiredException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,15 +28,15 @@ /** * Certificate Expired Exception. This is thrown whenever the current - * Date or the specified Date is after the - * notAfter date/time specified in the validity period + * {@code Date} or the specified {@code Date} is after the + * {@code notAfter} date/time specified in the validity period * of the certificate. * - *

    Note: The classes in the package javax.security.cert + *

    Note: The classes in the package {@code javax.security.cert} * exist for compatibility with earlier versions of the * Java Secure Sockets Extension (JSSE). New applications should instead * use the standard Java SE certificate classes located in - * java.security.cert.

    + * {@code java.security.cert}.

    * * @since 1.4 * @author Hemma Prafullchandra diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/CertificateNotYetValidException.java --- a/jdk/src/share/classes/javax/security/cert/CertificateNotYetValidException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/cert/CertificateNotYetValidException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,15 +28,15 @@ /** * Certificate is not yet valid exception. This is thrown whenever - * the current Date or the specified Date - * is before the notBefore date/time in the Certificate + * the current {@code Date} or the specified {@code Date} + * is before the {@code notBefore} date/time in the Certificate * validity period. * - *

    Note: The classes in the package javax.security.cert + *

    Note: The classes in the package {@code javax.security.cert} * exist for compatibility with earlier versions of the * Java Secure Sockets Extension (JSSE). New applications should instead * use the standard Java SE certificate classes located in - * java.security.cert.

    + * {@code java.security.cert}.

    * * @since 1.4 * @author Hemma Prafullchandra diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/CertificateParsingException.java --- a/jdk/src/share/classes/javax/security/cert/CertificateParsingException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/cert/CertificateParsingException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,11 +31,11 @@ * invalid DER encoded certificate is parsed or unsupported DER features * are found in the Certificate. * - *

    Note: The classes in the package javax.security.cert + *

    Note: The classes in the package {@code javax.security.cert} * exist for compatibility with earlier versions of the * Java Secure Sockets Extension (JSSE). New applications should instead * use the standard Java SE certificate classes located in - * java.security.cert.

    + * {@code java.security.cert}.

    * * @since 1.4 * @author Hemma Prafullchandra diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/X509Certificate.java --- a/jdk/src/share/classes/javax/security/cert/X509Certificate.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/cert/X509Certificate.java Tue Jul 16 12:19:41 2013 -0700 @@ -70,7 +70,7 @@ * CA certificates are either signed by themselves, or by some other * CA such as a "root" CA. *

    - * The ASN.1 definition of tbsCertificate is: + * The ASN.1 definition of {@code tbsCertificate} is: *

      * TBSCertificate  ::=  SEQUENCE  {
      *     version         [0]  EXPLICIT Version DEFAULT v1,
    @@ -113,11 +113,11 @@
      * initialization time and will fallback on a default implementation if
      * the Security property is not accessible.
      *
    - * 

    Note: The classes in the package javax.security.cert + *

    Note: The classes in the package {@code javax.security.cert} * exist for compatibility with earlier versions of the * Java Secure Sockets Extension (JSSE). New applications should instead * use the standard Java SE certificate classes located in - * java.security.cert.

    + * {@code java.security.cert}.

    * * @author Hemma Prafullchandra * @since 1.4 @@ -150,7 +150,7 @@ /** * Instantiates an X509Certificate object, and initializes it with - * the data read from the input stream inStream. + * the data read from the input stream {@code inStream}. * The implementation (X509Certificate is an abstract class) is * provided by the class specified as the value of the * {@code cert.provider.x509v1} security property. @@ -191,7 +191,7 @@ * @param certData a byte array containing the DER-encoded * certificate. * @return an X509Certificate object initialized with the data - * from certData. + * from {@code certData}. * @exception CertificateException if a class initialization * or certificate parsing error occurs. */ @@ -281,16 +281,16 @@ * @param date the Date to check against to see if this certificate * is valid at that date/time. * @exception CertificateExpiredException if the certificate has expired - * with respect to the date supplied. + * with respect to the {@code date} supplied. * @exception CertificateNotYetValidException if the certificate is not - * yet valid with respect to the date supplied. + * yet valid with respect to the {@code date} supplied. * @see #checkValidity() */ public abstract void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidException; /** - * Gets the version (version number) value from the + * Gets the {@code version} (version number) value from the * certificate. The ASN.1 definition for this is: *
          * version         [0]  EXPLICIT Version DEFAULT v1
    @@ -303,7 +303,7 @@
         public abstract int getVersion();
     
         /**
    -     * Gets the serialNumber value from the certificate.
    +     * Gets the {@code serialNumber} value from the certificate.
          * The serial number is an integer assigned by the certification
          * authority to each certificate. It must be unique for each
          * certificate issued by a given CA (i.e., the issuer name and
    @@ -320,7 +320,7 @@
         public abstract BigInteger getSerialNumber();
     
         /**
    -     * Gets the issuer (issuer distinguished name) value from
    +     * Gets the {@code issuer} (issuer distinguished name) value from
          * the certificate. The issuer name identifies the entity that signed (and
          * issued) the certificate.
          *
    @@ -341,27 +341,27 @@
          * AttributeType ::= OBJECT IDENTIFIER
          * AttributeValue ::= ANY
          * 
    - * The Name describes a hierarchical name composed of + * The {@code Name} describes a hierarchical name composed of * attributes, such as country name, and corresponding values, such as US. - * The type of the AttributeValue component is determined by - * the AttributeType; in general it will be a - * directoryString. A directoryString is usually - * one of PrintableString, - * TeletexString or UniversalString. + * The type of the {@code AttributeValue} component is determined by + * the {@code AttributeType}; in general it will be a + * {@code directoryString}. A {@code directoryString} is usually + * one of {@code PrintableString}, + * {@code TeletexString} or {@code UniversalString}. * * @return a Principal whose name is the issuer distinguished name. */ public abstract Principal getIssuerDN(); /** - * Gets the subject (subject distinguished name) value + * Gets the {@code subject} (subject distinguished name) value * from the certificate. * The ASN.1 definition for this is: *
          * subject    Name
          * 
    * - *

    See {@link #getIssuerDN() getIssuerDN} for Name + *

    See {@link #getIssuerDN() getIssuerDN} for {@code Name} * and other relevant definitions. * * @return a Principal whose name is the subject name. @@ -370,7 +370,7 @@ public abstract Principal getSubjectDN(); /** - * Gets the notBefore date from the validity period of + * Gets the {@code notBefore} date from the validity period of * the certificate. * The relevant ASN.1 definitions are: *

    @@ -391,7 +391,7 @@
         public abstract Date getNotBefore();
     
         /**
    -     * Gets the notAfter date from the validity period of
    +     * Gets the {@code notAfter} date from the validity period of
          * the certificate. See {@link #getNotBefore() getNotBefore}
          * for relevant ASN.1 definitions.
          *
    @@ -415,7 +415,7 @@
          *                             -- algorithm object identifier value
          * 
    * - *

    The algorithm name is determined from the algorithm + *

    The algorithm name is determined from the {@code algorithm} * OID string. * * @return the signature algorithm name. diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/cert/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes for public key certificates. + * + * These classes include a simplified version of the + * java.security.cert package. These classes were developed + * as part of the Java Secure Socket + * Extension (JSSE). When JSSE was added to the J2SE version 1.4, this + * package was added for backward-compatibility reasons only. + * + * New applications should not use this package, but rather + * java.security.cert. + * + * @since 1.4 + */ +package javax.security.cert; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/cert/package.html --- a/jdk/src/share/classes/javax/security/cert/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ - - - - - - - - -Provides classes for public key certificates. - -

    - -These classes include a simplified version of the -java.security.cert package. These classes were developed -as part of the Java Secure Socket -Extension (JSSE). When JSSE was added to the J2SE version 1.4, this -package was added for backward-compatibility reasons only. - -

    - -New applications should not use this package, but rather -java.security.cert. - - -@since 1.4 - - diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/AuthenticationException.java --- a/jdk/src/share/classes/javax/security/sasl/AuthenticationException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/AuthenticationException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ */ public class AuthenticationException extends SaslException { /** - * Constructs a new instance of AuthenticationException. + * Constructs a new instance of {@code AuthenticationException}. * The root exception and the detailed message are null. */ public AuthenticationException () { @@ -53,7 +53,7 @@ } /** - * Constructs a new instance of AuthenticationException + * Constructs a new instance of {@code AuthenticationException} * with a detailed message. * The root exception is null. * @param detail A possibly null string containing details of the exception. @@ -65,7 +65,7 @@ } /** - * Constructs a new instance of AuthenticationException with a detailed message + * Constructs a new instance of {@code AuthenticationException} with a detailed message * and a root exception. * * @param detail A possibly null string containing details of the exception. diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/AuthorizeCallback.java --- a/jdk/src/share/classes/javax/security/sasl/AuthorizeCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/AuthorizeCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ import javax.security.auth.callback.Callback; /** - * This callback is used by SaslServer to determine whether + * This callback is used by {@code SaslServer} to determine whether * one entity (identified by an authenticated authentication id) * can act on * behalf of another entity (identified by an authorization id). @@ -66,7 +66,7 @@ private boolean authorized; /** - * Constructs an instance of AuthorizeCallback. + * Constructs an instance of {@code AuthorizeCallback}. * * @param authnID The (authenticated) authentication id. * @param authzID The authorization id. @@ -96,7 +96,7 @@ * Determines whether the authentication id is allowed to * act on behalf of the authorization id. * - * @return true if authorization is allowed; false otherwise + * @return {@code true} if authorization is allowed; {@code false} otherwise * @see #setAuthorized(boolean) * @see #getAuthorizedID() */ @@ -106,7 +106,7 @@ /** * Sets whether the authorization is allowed. - * @param ok true if authorization is allowed; false otherwise + * @param ok {@code true} if authorization is allowed; {@code false} otherwise * @see #isAuthorized * @see #setAuthorizedID(java.lang.String) */ @@ -116,7 +116,7 @@ /** * Returns the id of the authorized user. - * @return The id of the authorized user. null means the + * @return The id of the authorized user. {@code null} means the * authorization failed. * @see #setAuthorized(boolean) * @see #setAuthorizedID(java.lang.String) diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/RealmCallback.java --- a/jdk/src/share/classes/javax/security/sasl/RealmCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/RealmCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ import javax.security.auth.callback.TextInputCallback; /** - * This callback is used by SaslClient and SaslServer + * This callback is used by {@code SaslClient} and {@code SaslServer} * to retrieve realm information. * * @since 1.5 @@ -39,10 +39,10 @@ public class RealmCallback extends TextInputCallback { /** - * Constructs a RealmCallback with a prompt. + * Constructs a {@code RealmCallback} with a prompt. * * @param prompt The non-null prompt to use to request the realm information. - * @throws IllegalArgumentException If prompt is null or + * @throws IllegalArgumentException If {@code prompt} is null or * the empty string. */ public RealmCallback(String prompt) { @@ -50,14 +50,14 @@ } /** - * Constructs a RealmCallback with a prompt and default + * Constructs a {@code RealmCallback} with a prompt and default * realm information. * * @param prompt The non-null prompt to use to request the realm information. * @param defaultRealmInfo The non-null default realm information to use. - * @throws IllegalArgumentException If prompt is null or + * @throws IllegalArgumentException If {@code prompt} is null or * the empty string, - * or if defaultRealm is empty or null. + * or if {@code defaultRealm} is empty or null. */ public RealmCallback(String prompt, String defaultRealmInfo) { super(prompt, defaultRealmInfo); diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/RealmChoiceCallback.java --- a/jdk/src/share/classes/javax/security/sasl/RealmChoiceCallback.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/RealmChoiceCallback.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ import javax.security.auth.callback.ChoiceCallback; /** - * This callback is used by SaslClient and SaslServer + * This callback is used by {@code SaslClient} and {@code SaslServer} * to obtain a realm given a list of realm choices. * * @since 1.5 @@ -39,19 +39,19 @@ public class RealmChoiceCallback extends ChoiceCallback { /** - * Constructs a RealmChoiceCallback with a prompt, a list of + * Constructs a {@code RealmChoiceCallback} with a prompt, a list of * choices and a default choice. * * @param prompt the non-null prompt to use to request the realm. * @param choices the non-null list of realms to choose from. * @param defaultChoice the choice to be used as the default choice * when the list of choices is displayed. It is an index into - * the choices arary. + * the {@code choices} arary. * @param multiple true if multiple choices allowed; false otherwise - * @throws IllegalArgumentException If prompt is null or the empty string, - * if choices has a length of 0, if any element from - * choices is null or empty, or if defaultChoice - * does not fall within the array boundary of choices + * @throws IllegalArgumentException If {@code prompt} is null or the empty string, + * if {@code choices} has a length of 0, if any element from + * {@code choices} is null or empty, or if {@code defaultChoice} + * does not fall within the array boundary of {@code choices} */ public RealmChoiceCallback(String prompt, String[]choices, int defaultChoice, boolean multiple) { diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/Sasl.java --- a/jdk/src/share/classes/javax/security/sasl/Sasl.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/Sasl.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,15 +72,15 @@ * of quality-of-protection values that the * client or server is willing to support. A qop value is one of *

      - *
    • "auth" - authentication only
    • - *
    • "auth-int" - authentication plus integrity protection
    • - *
    • "auth-conf" - authentication plus integrity and confidentiality + *
    • {@code "auth"} - authentication only
    • + *
    • {@code "auth-int"} - authentication plus integrity protection
    • + *
    • {@code "auth-conf"} - authentication plus integrity and confidentiality * protection
    • *
    * * The order of the list specifies the preference order of the client or - * server. If this property is absent, the default qop is "auth". - * The value of this constant is "javax.security.sasl.qop". + * server. If this property is absent, the default qop is {@code "auth"}. + * The value of this constant is {@code "javax.security.sasl.qop"}. */ public static final String QOP = "javax.security.sasl.qop"; @@ -90,9 +90,9 @@ * of cipher strength values that * the client or server is willing to support. A strength value is one of *
      - *
    • "low"
    • - *
    • "medium"
    • - *
    • "high"
    • + *
    • {@code "low"}
    • + *
    • {@code "medium"}
    • + *
    • {@code "high"}
    • *
    * The order of the list specifies the preference order of the client or * server. An implementation should allow configuration of the meaning @@ -101,19 +101,19 @@ * cipher suites that match the strength values. *
    * If this property is absent, the default strength is - * "high,medium,low". - * The value of this constant is "javax.security.sasl.strength". + * {@code "high,medium,low"}. + * The value of this constant is {@code "javax.security.sasl.strength"}. */ public static final String STRENGTH = "javax.security.sasl.strength"; /** * The name of a property that specifies whether the * server must authenticate to the client. The property contains - * "true" if the server must - * authenticate the to client; "false" otherwise. - * The default is "false". + * {@code "true"} if the server must + * authenticate the to client; {@code "false"} otherwise. + * The default is {@code "false"}. *
    The value of this constant is - * "javax.security.sasl.server.authentication". + * {@code "javax.security.sasl.server.authentication"}. */ public static final String SERVER_AUTH = "javax.security.sasl.server.authentication"; @@ -125,28 +125,28 @@ * The property contains the bound host name after the authentication * exchange has completed. It is only available on the server side. *
    The value of this constant is - * "javax.security.sasl.bound.server.name". + * {@code "javax.security.sasl.bound.server.name"}. */ public static final String BOUND_SERVER_NAME = "javax.security.sasl.bound.server.name"; /** * The name of a property that specifies the maximum size of the receive - * buffer in bytes of SaslClient/SaslServer. + * buffer in bytes of {@code SaslClient}/{@code SaslServer}. * The property contains the string representation of an integer. *
    If this property is absent, the default size * is defined by the mechanism. - *
    The value of this constant is "javax.security.sasl.maxbuffer". + *
    The value of this constant is {@code "javax.security.sasl.maxbuffer"}. */ public static final String MAX_BUFFER = "javax.security.sasl.maxbuffer"; /** * The name of a property that specifies the maximum size of the raw send - * buffer in bytes of SaslClient/SaslServer. + * buffer in bytes of {@code SaslClient}/{@code SaslServer}. * The property contains the string representation of an integer. * The value of this property is negotiated between the client and server * during the authentication exchange. - *
    The value of this constant is "javax.security.sasl.rawsendsize". + *
    The value of this constant is {@code "javax.security.sasl.rawsendsize"}. */ public static final String RAW_SEND_SIZE = "javax.security.sasl.rawsendsize"; @@ -181,11 +181,11 @@ * The name of a property that specifies * whether mechanisms susceptible to simple plain passive attacks (e.g., * "PLAIN") are not permitted. The property - * contains "true" if such mechanisms are not permitted; - * "false" if such mechanisms are permitted. - * The default is "false". + * contains {@code "true"} if such mechanisms are not permitted; + * {@code "false"} if such mechanisms are permitted. + * The default is {@code "false"}. *
    The value of this constant is - * "javax.security.sasl.policy.noplaintext". + * {@code "javax.security.sasl.policy.noplaintext"}. */ public static final String POLICY_NOPLAINTEXT = "javax.security.sasl.policy.noplaintext"; @@ -194,12 +194,12 @@ * The name of a property that specifies whether * mechanisms susceptible to active (non-dictionary) attacks * are not permitted. - * The property contains "true" + * The property contains {@code "true"} * if mechanisms susceptible to active attacks - * are not permitted; "false" if such mechanisms are permitted. - * The default is "false". + * are not permitted; {@code "false"} if such mechanisms are permitted. + * The default is {@code "false"}. *
    The value of this constant is - * "javax.security.sasl.policy.noactive". + * {@code "javax.security.sasl.policy.noactive"}. */ public static final String POLICY_NOACTIVE = "javax.security.sasl.policy.noactive"; @@ -207,26 +207,26 @@ /** * The name of a property that specifies whether * mechanisms susceptible to passive dictionary attacks are not permitted. - * The property contains "true" + * The property contains {@code "true"} * if mechanisms susceptible to dictionary attacks are not permitted; - * "false" if such mechanisms are permitted. - * The default is "false". + * {@code "false"} if such mechanisms are permitted. + * The default is {@code "false"}. *
    * The value of this constant is - * "javax.security.sasl.policy.nodictionary". + * {@code "javax.security.sasl.policy.nodictionary"}. */ public static final String POLICY_NODICTIONARY = "javax.security.sasl.policy.nodictionary"; /** * The name of a property that specifies whether mechanisms that accept - * anonymous login are not permitted. The property contains "true" + * anonymous login are not permitted. The property contains {@code "true"} * if mechanisms that accept anonymous login are not permitted; - * "false" - * if such mechanisms are permitted. The default is "false". + * {@code "false"} + * if such mechanisms are permitted. The default is {@code "false"}. *
    * The value of this constant is - * "javax.security.sasl.policy.noanonymous". + * {@code "javax.security.sasl.policy.noanonymous"}. */ public static final String POLICY_NOANONYMOUS = "javax.security.sasl.policy.noanonymous"; @@ -237,12 +237,12 @@ * means that breaking into one session will not automatically * provide information for breaking into future sessions. * The property - * contains "true" if mechanisms that implement forward secrecy - * between sessions are required; "false" if such mechanisms - * are not required. The default is "false". + * contains {@code "true"} if mechanisms that implement forward secrecy + * between sessions are required; {@code "false"} if such mechanisms + * are not required. The default is {@code "false"}. *
    * The value of this constant is - * "javax.security.sasl.policy.forward". + * {@code "javax.security.sasl.policy.forward"}. */ public static final String POLICY_FORWARD_SECRECY = "javax.security.sasl.policy.forward"; @@ -250,12 +250,12 @@ /** * The name of a property that specifies whether * mechanisms that pass client credentials are required. The property - * contains "true" if mechanisms that pass - * client credentials are required; "false" - * if such mechanisms are not required. The default is "false". + * contains {@code "true"} if mechanisms that pass + * client credentials are required; {@code "false"} + * if such mechanisms are not required. The default is {@code "false"}. *
    * The value of this constant is - * "javax.security.sasl.policy.credentials". + * {@code "javax.security.sasl.policy.credentials"}. */ public static final String POLICY_PASS_CREDENTIALS = "javax.security.sasl.policy.credentials"; @@ -269,38 +269,38 @@ * supports delegated authentication. *
    * The value of this constant is - * "javax.security.sasl.credentials". + * {@code "javax.security.sasl.credentials"}. */ public static final String CREDENTIALS = "javax.security.sasl.credentials"; /** - * Creates a SaslClient using the parameters supplied. + * Creates a {@code SaslClient} using the parameters supplied. * * This method uses the JCA Security Provider Framework, described in the * "Java Cryptography Architecture API Specification & Reference", for - * locating and selecting a SaslClient implementation. + * locating and selecting a {@code SaslClient} implementation. * * First, it - * obtains an ordered list of SaslClientFactory instances from + * obtains an ordered list of {@code SaslClientFactory} instances from * the registered security providers for the "SaslClientFactory" service * and the specified SASL mechanism(s). It then invokes - * createSaslClient() on each factory instance on the list - * until one produces a non-null SaslClient instance. It returns - * the non-null SaslClient instance, or null if the search fails - * to produce a non-null SaslClient instance. + * {@code createSaslClient()} on each factory instance on the list + * until one produces a non-null {@code SaslClient} instance. It returns + * the non-null {@code SaslClient} instance, or null if the search fails + * to produce a non-null {@code SaslClient} instance. *

    * A security provider for SaslClientFactory registers with the * JCA Security Provider Framework keys of the form
    - * SaslClientFactory.mechanism_name + * {@code SaslClientFactory.}{@code mechanism_name} *
    * and values that are class names of implementations of - * javax.security.sasl.SaslClientFactory. + * {@code javax.security.sasl.SaslClientFactory}. * * For example, a provider that contains a factory class, - * com.wiz.sasl.digest.ClientFactory, that supports the + * {@code com.wiz.sasl.digest.ClientFactory}, that supports the * "DIGEST-MD5" mechanism would register the following entry with the JCA: - * SaslClientFactory.DIGEST-MD5 com.wiz.sasl.digest.ClientFactory + * {@code SaslClientFactory.DIGEST-MD5 com.wiz.sasl.digest.ClientFactory} *

    * See the * "Java Cryptography Architecture API Specification & Reference" @@ -325,9 +325,9 @@ * @param props The possibly null set of properties used to * select the SASL mechanism and to configure the authentication * exchange of the selected mechanism. - * For example, if props contains the - * Sasl.POLICY_NOPLAINTEXT property with the value - * "true", then the selected + * For example, if {@code props} contains the + * {@code Sasl.POLICY_NOPLAINTEXT} property with the value + * {@code "true"}, then the selected * SASL mechanism must not be susceptible to simple plain passive attacks. * In addition to the standard properties declared in this class, * other, possibly mechanism-specific, properties can be included. @@ -338,16 +338,16 @@ * mechanisms to get further information from the application/library * to complete the authentication. For example, a SASL mechanism might * require the authentication ID, password and realm from the caller. - * The authentication ID is requested by using a NameCallback. - * The password is requested by using a PasswordCallback. - * The realm is requested by using a RealmChoiceCallback if there is a list - * of realms to choose from, and by using a RealmCallback if + * The authentication ID is requested by using a {@code NameCallback}. + * The password is requested by using a {@code PasswordCallback}. + * The realm is requested by using a {@code RealmChoiceCallback} if there is a list + * of realms to choose from, and by using a {@code RealmCallback} if * the realm must be entered. * - *@return A possibly null SaslClient created using the parameters - * supplied. If null, cannot find a SaslClientFactory + *@return A possibly null {@code SaslClient} created using the parameters + * supplied. If null, cannot find a {@code SaslClientFactory} * that will produce one. - *@exception SaslException If cannot create a SaslClient because + *@exception SaslException If cannot create a {@code SaslClient} because * of an error. */ public static SaslClient createSaslClient( @@ -423,34 +423,34 @@ /** - * Creates a SaslServer for the specified mechanism. + * Creates a {@code SaslServer} for the specified mechanism. * * This method uses the JCA Security Provider Framework, * described in the * "Java Cryptography Architecture API Specification & Reference", for - * locating and selecting a SaslServer implementation. + * locating and selecting a {@code SaslServer} implementation. * * First, it - * obtains an ordered list of SaslServerFactory instances from + * obtains an ordered list of {@code SaslServerFactory} instances from * the registered security providers for the "SaslServerFactory" service * and the specified mechanism. It then invokes - * createSaslServer() on each factory instance on the list - * until one produces a non-null SaslServer instance. It returns - * the non-null SaslServer instance, or null if the search fails - * to produce a non-null SaslServer instance. + * {@code createSaslServer()} on each factory instance on the list + * until one produces a non-null {@code SaslServer} instance. It returns + * the non-null {@code SaslServer} instance, or null if the search fails + * to produce a non-null {@code SaslServer} instance. *

    * A security provider for SaslServerFactory registers with the * JCA Security Provider Framework keys of the form
    - * SaslServerFactory.mechanism_name + * {@code SaslServerFactory.}{@code mechanism_name} *
    * and values that are class names of implementations of - * javax.security.sasl.SaslServerFactory. + * {@code javax.security.sasl.SaslServerFactory}. * * For example, a provider that contains a factory class, - * com.wiz.sasl.digest.ServerFactory, that supports the + * {@code com.wiz.sasl.digest.ServerFactory}, that supports the * "DIGEST-MD5" mechanism would register the following entry with the JCA: - * SaslServerFactory.DIGEST-MD5 com.wiz.sasl.digest.ServerFactory + * {@code SaslServerFactory.DIGEST-MD5 com.wiz.sasl.digest.ServerFactory} *

    * See the * "Java Cryptography Architecture API Specification & Reference" @@ -463,14 +463,14 @@ * the authentication is being performed (e.g., "ldap"). * @param serverName The fully qualified host name of the server, or null * if the server is not bound to any specific host name. If the mechanism - * does not allow an unbound server, a SaslException will + * does not allow an unbound server, a {@code SaslException} will * be thrown. * @param props The possibly null set of properties used to * select the SASL mechanism and to configure the authentication * exchange of the selected mechanism. - * For example, if props contains the - * Sasl.POLICY_NOPLAINTEXT property with the value - * "true", then the selected + * For example, if {@code props} contains the + * {@code Sasl.POLICY_NOPLAINTEXT} property with the value + * {@code "true"}, then the selected * SASL mechanism must not be susceptible to simple plain passive attacks. * In addition to the standard properties declared in this class, * other, possibly mechanism-specific, properties can be included. @@ -481,16 +481,16 @@ * mechanisms to get further information from the application/library * to complete the authentication. For example, a SASL mechanism might * require the authentication ID, password and realm from the caller. - * The authentication ID is requested by using a NameCallback. - * The password is requested by using a PasswordCallback. - * The realm is requested by using a RealmChoiceCallback if there is a list - * of realms to choose from, and by using a RealmCallback if + * The authentication ID is requested by using a {@code NameCallback}. + * The password is requested by using a {@code PasswordCallback}. + * The realm is requested by using a {@code RealmChoiceCallback} if there is a list + * of realms to choose from, and by using a {@code RealmCallback} if * the realm must be entered. * - *@return A possibly null SaslServer created using the parameters - * supplied. If null, cannot find a SaslServerFactory + *@return A possibly null {@code SaslServer} created using the parameters + * supplied. If null, cannot find a {@code SaslServerFactory} * that will produce one. - *@exception SaslException If cannot create a SaslServer because + *@exception SaslException If cannot create a {@code SaslServer} because * of an error. **/ public static SaslServer @@ -533,11 +533,11 @@ } /** - * Gets an enumeration of known factories for producing SaslClient. + * Gets an enumeration of known factories for producing {@code SaslClient}. * This method uses the same algorithm for locating factories as - * createSaslClient(). + * {@code createSaslClient()}. * @return A non-null enumeration of known factories for producing - * SaslClient. + * {@code SaslClient}. * @see #createSaslClient */ public static Enumeration getSaslClientFactories() { @@ -554,11 +554,11 @@ } /** - * Gets an enumeration of known factories for producing SaslServer. + * Gets an enumeration of known factories for producing {@code SaslServer}. * This method uses the same algorithm for locating factories as - * createSaslServer(). + * {@code createSaslServer()}. * @return A non-null enumeration of known factories for producing - * SaslServer. + * {@code SaslServer}. * @see #createSaslServer */ public static Enumeration getSaslServerFactories() { diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/SaslClient.java --- a/jdk/src/share/classes/javax/security/sasl/SaslClient.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/SaslClient.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,14 +30,14 @@ *

    * A protocol library such as one for LDAP gets an instance of this * class in order to perform authentication defined by a specific SASL - * mechanism. Invoking methods on the SaslClient instance + * mechanism. Invoking methods on the {@code SaslClient} instance * process challenges and create responses according to the SASL - * mechanism implemented by the SaslClient. + * mechanism implemented by the {@code SaslClient}. * As the authentication proceeds, the instance * encapsulates the state of a SASL client's authentication exchange. *

    - * Here's an example of how an LDAP library might use a SaslClient. - * It first gets an instance of a SaslClient: + * Here's an example of how an LDAP library might use a {@code SaslClient}. + * It first gets an instance of a {@code SaslClient}: *

    {@code
      * SaslClient sc = Sasl.createSaslClient(mechanisms,
      *     authorizationId, protocol, serverName, props, callbackHandler);
    @@ -77,16 +77,16 @@
      *}
    * * If the mechanism has an initial response, the library invokes - * evaluateChallenge() with an empty + * {@code evaluateChallenge()} with an empty * challenge and to get initial response. * Protocols such as IMAP4, which do not include an initial response with * their first authentication command to the server, initiates the - * authentication without first calling hasInitialResponse() - * or evaluateChallenge(). + * authentication without first calling {@code hasInitialResponse()} + * or {@code evaluateChallenge()}. * When the server responds to the command, it sends an initial challenge. * For a SASL mechanism in which the client sends data first, the server should * have issued a challenge with no data. This will then result in a call - * (on the client) to evaluateChallenge() with an empty challenge. + * (on the client) to {@code evaluateChallenge()} with an empty challenge. * * @since 1.5 * @@ -107,7 +107,7 @@ /** * Determines whether this mechanism has an optional initial response. - * If true, caller should call evaluateChallenge() with an + * If true, caller should call {@code evaluateChallenge()} with an * empty array to get the initial response. * * @return true if this mechanism has an initial response. @@ -148,22 +148,22 @@ /** * Unwraps a byte array received from the server. * This method can be called only after the authentication exchange has - * completed (i.e., when isComplete() returns true) and only if + * completed (i.e., when {@code isComplete()} returns true) and only if * the authentication exchange has negotiated integrity and/or privacy * as the quality of protection; otherwise, an - * IllegalStateException is thrown. + * {@code IllegalStateException} is thrown. *

    - * incoming is the contents of the SASL buffer as defined in RFC 2222 + * {@code incoming} is the contents of the SASL buffer as defined in RFC 2222 * without the leading four octet field that represents the length. - * offset and len specify the portion of incoming + * {@code offset} and {@code len} specify the portion of {@code incoming} * to use. * * @param incoming A non-null byte array containing the encoded bytes * from the server. - * @param offset The starting position at incoming of the bytes to use. - * @param len The number of bytes from incoming to use. + * @param offset The starting position at {@code incoming} of the bytes to use. + * @param len The number of bytes from {@code incoming} to use. * @return A non-null byte array containing the decoded bytes. - * @exception SaslException if incoming cannot be successfully + * @exception SaslException if {@code incoming} cannot be successfully * unwrapped. * @exception IllegalStateException if the authentication exchange has * not completed, or if the negotiated quality of protection @@ -175,22 +175,22 @@ /** * Wraps a byte array to be sent to the server. * This method can be called only after the authentication exchange has - * completed (i.e., when isComplete() returns true) and only if + * completed (i.e., when {@code isComplete()} returns true) and only if * the authentication exchange has negotiated integrity and/or privacy * as the quality of protection; otherwise, an - * IllegalStateException is thrown. + * {@code IllegalStateException} is thrown. *

    * The result of this method will make up the contents of the SASL buffer * as defined in RFC 2222 without the leading four octet field that * represents the length. - * offset and len specify the portion of outgoing + * {@code offset} and {@code len} specify the portion of {@code outgoing} * to use. * * @param outgoing A non-null byte array containing the bytes to encode. - * @param offset The starting position at outgoing of the bytes to use. - * @param len The number of bytes from outgoing to use. + * @param offset The starting position at {@code outgoing} of the bytes to use. + * @param len The number of bytes from {@code outgoing} to use. * @return A non-null byte array containing the encoded bytes. - * @exception SaslException if outgoing cannot be successfully + * @exception SaslException if {@code outgoing} cannot be successfully * wrapped. * @exception IllegalStateException if the authentication exchange has * not completed, or if the negotiated quality of protection @@ -202,8 +202,8 @@ /** * Retrieves the negotiated property. * This method can be called only after the authentication exchange has - * completed (i.e., when isComplete() returns true); otherwise, an - * IllegalStateException is thrown. + * completed (i.e., when {@code isComplete()} returns true); otherwise, an + * {@code IllegalStateException} is thrown. * * @param propName The non-null property name. * @return The value of the negotiated property. If null, the property was diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/SaslClientFactory.java --- a/jdk/src/share/classes/javax/security/sasl/SaslClientFactory.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/SaslClientFactory.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,16 +29,16 @@ import javax.security.auth.callback.CallbackHandler; /** - * An interface for creating instances of SaslClient. + * An interface for creating instances of {@code SaslClient}. * A class that implements this interface * must be thread-safe and handle multiple simultaneous * requests. It must also have a public constructor that accepts no * argument. *

    * This interface is not normally accessed directly by a client, which will use the - * Sasl static methods + * {@code Sasl} static methods * instead. However, a particular environment may provide and install a - * new or different SaslClientFactory. + * new or different {@code SaslClientFactory}. * * @since 1.5 * @@ -66,7 +66,7 @@ * of the server to authenticate to. * @param props The possibly null set of properties used to select the SASL * mechanism and to configure the authentication exchange of the selected - * mechanism. See the Sasl class for a list of standard properties. + * mechanism. See the {@code Sasl} class for a list of standard properties. * Other, possibly mechanism-specific, properties can be included. * Properties not relevant to the selected mechanism are ignored, * including any map entries with non-String keys. @@ -75,16 +75,16 @@ * mechanisms to get further information from the application/library * to complete the authentication. For example, a SASL mechanism might * require the authentication ID, password and realm from the caller. - * The authentication ID is requested by using a NameCallback. - * The password is requested by using a PasswordCallback. - * The realm is requested by using a RealmChoiceCallback if there is a list - * of realms to choose from, and by using a RealmCallback if + * The authentication ID is requested by using a {@code NameCallback}. + * The password is requested by using a {@code PasswordCallback}. + * The realm is requested by using a {@code RealmChoiceCallback} if there is a list + * of realms to choose from, and by using a {@code RealmCallback} if * the realm must be entered. * - *@return A possibly null SaslClient created using the parameters - * supplied. If null, this factory cannot produce a SaslClient + *@return A possibly null {@code SaslClient} created using the parameters + * supplied. If null, this factory cannot produce a {@code SaslClient} * using the parameters supplied. - *@exception SaslException If cannot create a SaslClient because + *@exception SaslException If cannot create a {@code SaslClient} because * of an error. */ public abstract SaslClient createSaslClient( @@ -99,12 +99,12 @@ * Returns an array of names of mechanisms that match the specified * mechanism selection policies. * @param props The possibly null set of properties used to specify the - * security policy of the SASL mechanisms. For example, if props - * contains the Sasl.POLICY_NOPLAINTEXT property with the value - * "true", then the factory must not return any SASL mechanisms + * security policy of the SASL mechanisms. For example, if {@code props} + * contains the {@code Sasl.POLICY_NOPLAINTEXT} property with the value + * {@code "true"}, then the factory must not return any SASL mechanisms * that are susceptible to simple plain passive attacks. - * See the Sasl class for a complete list of policy properties. - * Non-policy related properties, if present in props, are ignored, + * See the {@code Sasl} class for a complete list of policy properties. + * Non-policy related properties, if present in {@code props}, are ignored, * including any map entries with non-String keys. * @return A non-null array containing a IANA-registered SASL mechanism names. */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/SaslException.java --- a/jdk/src/share/classes/javax/security/sasl/SaslException.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/SaslException.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ private Throwable _exception; /** - * Constructs a new instance of SaslException. + * Constructs a new instance of {@code SaslException}. * The root exception and the detailed message are null. */ public SaslException () { @@ -53,7 +53,7 @@ } /** - * Constructs a new instance of SaslException with a detailed message. + * Constructs a new instance of {@code SaslException} with a detailed message. * The root exception is null. * @param detail A possibly null string containing details of the exception. * @@ -64,7 +64,7 @@ } /** - * Constructs a new instance of SaslException with a detailed message + * Constructs a new instance of {@code SaslException} with a detailed message * and a root exception. * For example, a SaslException might result from a problem with * the callback handler, which might throw a NoSuchCallbackException if diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/SaslServer.java --- a/jdk/src/share/classes/javax/security/sasl/SaslServer.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/SaslServer.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,14 +30,14 @@ *

    * A server such an LDAP server gets an instance of this * class in order to perform authentication defined by a specific SASL - * mechanism. Invoking methods on the SaslServer instance + * mechanism. Invoking methods on the {@code SaslServer} instance * generates challenges according to the SASL - * mechanism implemented by the SaslServer. + * mechanism implemented by the {@code SaslServer}. * As the authentication proceeds, the instance * encapsulates the state of a SASL server's authentication exchange. *

    - * Here's an example of how an LDAP server might use a SaslServer. - * It first gets an instance of a SaslServer for the SASL mechanism + * Here's an example of how an LDAP server might use a {@code SaslServer}. + * It first gets an instance of a {@code SaslServer} for the SASL mechanism * requested by the client: *

      * SaslServer ss = Sasl.createSaslServer(mechanism,
    @@ -104,8 +104,8 @@
          * to the client. It is non-null if the authentication must be continued
          * by sending a challenge to the client, or if the authentication has
          * succeeded but challenge data needs to be processed by the client.
    -     * isComplete() should be called
    -     * after each call to evaluateResponse(),to determine if any further
    +     * {@code isComplete()} should be called
    +     * after each call to {@code evaluateResponse()},to determine if any further
          * response is needed from the client.
          *
          * @param response The non-null (but possibly empty) response sent
    @@ -123,7 +123,7 @@
         /**
           * Determines whether the authentication exchange has completed.
           * This method is typically called after each invocation of
    -      * evaluateResponse() to determine whether the
    +      * {@code evaluateResponse()} to determine whether the
           * authentication has completed successfully or should be continued.
           * @return true if the authentication exchange has completed; false otherwise.
           */
    @@ -141,22 +141,22 @@
         /**
          * Unwraps a byte array received from the client.
          * This method can be called only after the authentication exchange has
    -     * completed (i.e., when isComplete() returns true) and only if
    +     * completed (i.e., when {@code isComplete()} returns true) and only if
          * the authentication exchange has negotiated integrity and/or privacy
          * as the quality of protection; otherwise,
    -     * an IllegalStateException is thrown.
    +     * an {@code IllegalStateException} is thrown.
          *

    - * incoming is the contents of the SASL buffer as defined in RFC 2222 + * {@code incoming} is the contents of the SASL buffer as defined in RFC 2222 * without the leading four octet field that represents the length. - * offset and len specify the portion of incoming + * {@code offset} and {@code len} specify the portion of {@code incoming} * to use. * * @param incoming A non-null byte array containing the encoded bytes * from the client. - * @param offset The starting position at incoming of the bytes to use. - * @param len The number of bytes from incoming to use. + * @param offset The starting position at {@code incoming} of the bytes to use. + * @param len The number of bytes from {@code incoming} to use. * @return A non-null byte array containing the decoded bytes. - * @exception SaslException if incoming cannot be successfully + * @exception SaslException if {@code incoming} cannot be successfully * unwrapped. * @exception IllegalStateException if the authentication exchange has * not completed, or if the negotiated quality of protection @@ -168,21 +168,21 @@ /** * Wraps a byte array to be sent to the client. * This method can be called only after the authentication exchange has - * completed (i.e., when isComplete() returns true) and only if + * completed (i.e., when {@code isComplete()} returns true) and only if * the authentication exchange has negotiated integrity and/or privacy - * as the quality of protection; otherwise, a SaslException is thrown. + * as the quality of protection; otherwise, a {@code SaslException} is thrown. *

    * The result of this method * will make up the contents of the SASL buffer as defined in RFC 2222 * without the leading four octet field that represents the length. - * offset and len specify the portion of outgoing + * {@code offset} and {@code len} specify the portion of {@code outgoing} * to use. * * @param outgoing A non-null byte array containing the bytes to encode. - * @param offset The starting position at outgoing of the bytes to use. - * @param len The number of bytes from outgoing to use. + * @param offset The starting position at {@code outgoing} of the bytes to use. + * @param len The number of bytes from {@code outgoing} to use. * @return A non-null byte array containing the encoded bytes. - * @exception SaslException if outgoing cannot be successfully + * @exception SaslException if {@code outgoing} cannot be successfully * wrapped. * @exception IllegalStateException if the authentication exchange has * not completed, or if the negotiated quality of protection has @@ -194,8 +194,8 @@ /** * Retrieves the negotiated property. * This method can be called only after the authentication exchange has - * completed (i.e., when isComplete() returns true); otherwise, an - * IllegalStateException is thrown. + * completed (i.e., when {@code isComplete()} returns true); otherwise, an + * {@code IllegalStateException} is thrown. * * @param propName the property * @return The value of the negotiated property. If null, the property was diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/SaslServerFactory.java --- a/jdk/src/share/classes/javax/security/sasl/SaslServerFactory.java Mon Jul 15 14:37:01 2013 -0700 +++ b/jdk/src/share/classes/javax/security/sasl/SaslServerFactory.java Tue Jul 16 12:19:41 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,16 +29,16 @@ import javax.security.auth.callback.CallbackHandler; /** - * An interface for creating instances of SaslServer. + * An interface for creating instances of {@code SaslServer}. * A class that implements this interface * must be thread-safe and handle multiple simultaneous * requests. It must also have a public constructor that accepts no * argument. *

    * This interface is not normally accessed directly by a server, which will use the - * Sasl static methods + * {@code Sasl} static methods * instead. However, a particular environment may provide and install a - * new or different SaslServerFactory. + * new or different {@code SaslServerFactory}. * * @since 1.5 * @@ -50,10 +50,10 @@ */ public abstract interface SaslServerFactory { /** - * Creates a SaslServer using the parameters supplied. + * Creates a {@code SaslServer} using the parameters supplied. * It returns null - * if no SaslServer can be created using the parameters supplied. - * Throws SaslException if it cannot create a SaslServer + * if no {@code SaslServer} can be created using the parameters supplied. + * Throws {@code SaslException} if it cannot create a {@code SaslServer} * because of an error. * * @param mechanism The non-null @@ -63,10 +63,10 @@ * @param serverName The fully qualified host name of the server to * authenticate to, or null if the server is not bound to any specific host * name. If the mechanism does not allow an unbound server, a - * SaslException will be thrown. + * {@code SaslException} will be thrown. * @param props The possibly null set of properties used to select the SASL * mechanism and to configure the authentication exchange of the selected - * mechanism. See the Sasl class for a list of standard properties. + * mechanism. See the {@code Sasl} class for a list of standard properties. * Other, possibly mechanism-specific, properties can be included. * Properties not relevant to the selected mechanism are ignored, * including any map entries with non-String keys. @@ -75,16 +75,16 @@ * mechanisms to get further information from the application/library * to complete the authentication. For example, a SASL mechanism might * require the authentication ID, password and realm from the caller. - * The authentication ID is requested by using a NameCallback. - * The password is requested by using a PasswordCallback. - * The realm is requested by using a RealmChoiceCallback if there is a list - * of realms to choose from, and by using a RealmCallback if + * The authentication ID is requested by using a {@code NameCallback}. + * The password is requested by using a {@code PasswordCallback}. + * The realm is requested by using a {@code RealmChoiceCallback} if there is a list + * of realms to choose from, and by using a {@code RealmCallback} if * the realm must be entered. * - *@return A possibly null SaslServer created using the parameters - * supplied. If null, this factory cannot produce a SaslServer + *@return A possibly null {@code SaslServer} created using the parameters + * supplied. If null, this factory cannot produce a {@code SaslServer} * using the parameters supplied. - *@exception SaslException If cannot create a SaslServer because + *@exception SaslException If cannot create a {@code SaslServer} because * of an error. */ public abstract SaslServer createSaslServer( @@ -98,12 +98,12 @@ * Returns an array of names of mechanisms that match the specified * mechanism selection policies. * @param props The possibly null set of properties used to specify the - * security policy of the SASL mechanisms. For example, if props - * contains the Sasl.POLICY_NOPLAINTEXT property with the value - * "true", then the factory must not return any SASL mechanisms + * security policy of the SASL mechanisms. For example, if {@code props} + * contains the {@code Sasl.POLICY_NOPLAINTEXT} property with the value + * {@code "true"}, then the factory must not return any SASL mechanisms * that are susceptible to simple plain passive attacks. - * See the Sasl class for a complete list of policy properties. - * Non-policy related properties, if present in props, are ignored, + * See the {@code Sasl} class for a complete list of policy properties. + * Non-policy related properties, if present in {@code props}, are ignored, * including any map entries with non-String keys. * @return A non-null array containing a IANA-registered SASL mechanism names. */ diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/javax/security/sasl/package-info.java Tue Jul 16 12:19:41 2013 -0700 @@ -0,0 +1,103 @@ +/* + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Contains class and interfaces for supporting SASL. + * + * This package defines classes and interfaces for SASL mechanisms. + * It is used by developers to add authentication support for + * connection-based protocols that use SASL. + * + *

    SASL Overview

    + * + * Simple Authentication and Security Layer (SASL) specifies a + * challenge-response protocol in which data is exchanged between the + * client and the server for the purposes of + * authentication and (optional) establishment of a security layer on + * which to carry on subsequent communications. It is used with + * connection-based protocols such as LDAPv3 or IMAPv4. SASL is + * described in + * RFC 2222. + * + * + * There are various mechanisms defined for SASL. + * Each mechanism defines the data that must be exchanged between the + * client and server in order for the authentication to succeed. + * This data exchange required for a particular mechanism is referred to + * to as its protocol profile. + * The following are some examples of mechanisms that have been defined by + * the Internet standards community. + *
      + *
    • DIGEST-MD5 (RFC 2831). + * This mechanism defines how HTTP Digest Authentication can be used as a SASL + * mechanism. + *
    • Anonymous (RFC 2245). + * This mechanism is anonymous authentication in which no credentials are + * necessary. + *
    • External (RFC 2222). + * This mechanism obtains authentication information + * from an external source (such as TLS or IPsec). + *
    • S/Key (RFC 2222). + * This mechanism uses the MD4 digest algorithm to exchange data based on + * a shared secret. + *
    • GSSAPI (RFC 2222). + * This mechanism uses the + * GSSAPI + * for obtaining authentication information. + *
    + * + * Some of these mechanisms provide both authentication and establishment + * of a security layer, others only authentication. Anonymous and + * S/Key do not provide for any security layers. GSSAPI and DIGEST-MD5 + * allow negotiation of the security layer. For External, the + * security layer is determined by the external protocol. + * + *

    Usage

    + * + * Users of this API are typically developers who produce + * client library implementations for connection-based protocols, + * such as LDAPv3 and IMAPv4, + * and developers who write servers (such as LDAP servers and IMAP servers). + * Developers who write client libraries use the + * {@code SaslClient} and {@code SaslClientFactory} interfaces. + * Developers who write servers use the + * {@code SaslServer} and {@code SaslServerFactory} interfaces. + * + * Among these two groups of users, each can be further divided into two groups: + * those who produce the SASL mechanisms and those + * who use the SASL mechanisms. + * The producers of SASL mechanisms need to provide implementations + * for these interfaces, while users of the SASL mechanisms use + * the APIs in this package to access those implementations. + * + *

    Related Documentation

    + * + * Please refer to the + * Java + * SASL Programming Guide for information on how to use this API. + * + * @since 1.5 + */ +package javax.security.sasl; diff -r ec84f0c313b0 -r 90956ead732f jdk/src/share/classes/javax/security/sasl/package.html --- a/jdk/src/share/classes/javax/security/sasl/package.html Mon Jul 15 14:37:01 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ - - - - - - - -Contains class and interfaces for supporting SASL. - -This package defines classes and interfaces for SASL mechanisms. -It is used by developers to add authentication support for -connection-based protocols that use SASL. - -

    SASL Overview

    -

    - -Simple Authentication and Security Layer (SASL) specifies a -challenge-response protocol in which data is exchanged between the -client and the server for the purposes of -authentication and (optional) establishment of a security layer on -which to carry on subsequent communications. It is used with -connection-based protocols such as LDAPv3 or IMAPv4. SASL is -described in -RFC 2222. - -

    -There are various mechanisms defined for SASL. -Each mechanism defines the data that must be exchanged between the -client and server in order for the authentication to succeed. -This data exchange required for a particular mechanism is referred to -to as its protocol profile. -The following are some examples of mechanims that have been defined by -the Internet standards community. -

      -
    • DIGEST-MD5 (RFC 2831). -This mechanism defines how HTTP Digest Authentication can be used as a SASL -mechanism. -
    • Anonymous (RFC 2245). -This mechamism is anonymous authentication in which no credentials are -necessary. -
    • External (RFC 2222). -This mechanism obtains authentication information -from an external source (such as TLS or IPsec). -
    • S/Key (RFC 2222). -This mechanism uses the MD4 digest algorithm to exchange data based on -a shared secret. -
    • GSSAPI (RFC 2222). -This mechanism uses the -GSSAPI -for obtaining authentication information. -
    - -

    -Some of these mechanisms provide both authentication and establishment -of a security layer, others only authentication. Anonymous and -S/Key do not provide for any security layers. GSSAPI and DIGEST-MD5 -allow negotiation of the security layer. For External, the -security layer is determined by the external protocol. - -

    Usage

    - -

    -Users of this API are typically developers who produce -client library implementations for connection-based protocols, -such as LDAPv3 and IMAPv4, -and developers who write servers (such as LDAP servers and IMAP servers). -Developers who write client libraries use the -SaslClient and SaslClientFactory interfaces. -Developers who write servers use the -SaslServer and SaslServerFactory interfaces. -

    -Among these two groups of users, each can be further divided into two groups: -those who produce the SASL mechanisms and those -who use the SASL mechanisms. -The producers of SASL mechanisms need to provide implementations -for these interfaces, while users of the SASL mechanisms use -the APIs in this package to access those implementations. - -

    Related Documentation

    - -Please refer to the -Java -SASL Programming Guide for information on how to use this API. - - -@since 1.5 - - - - -