harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r451637 - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org: apache/harmony/auth/login/ apache/harmony/auth/module/ ietf/jgss/
Date Sat, 30 Sep 2006 18:56:22 GMT
Author: ndbeyer
Date: Sat Sep 30 11:56:21 2006
New Revision: 451637

URL: http://svn.apache.org/viewvc?view=rev&rev=451637
Log:
Code cleanup -
* Add missing annotations
* Generification
* Add if/else braces
* Format code and comments
* Remove unnecessary comments

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfiguration.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfigurationParser.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/Krb5LoginModule.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/ChannelBinding.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSContext.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSCredential.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSException.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSName.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/MessageProp.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/Oid.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfiguration.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfiguration.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfiguration.java Sat Sep 30 11:56:21 2006
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Maxim V. Makarov
-* @version $Revision$
-*/
-
 package org.apache.harmony.auth.login;
 
 import java.io.File;
@@ -27,7 +22,7 @@
 import java.security.AccessController;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
@@ -37,7 +32,6 @@
 
 import org.apache.harmony.security.fortress.PolicyUtils;
 
-
 /**
  * Default Configuration implementation based on login configuration files.
  * This implementation recognizes text files, consisting of clauses with the
@@ -50,54 +44,50 @@
  * };
  * </pre>
  */
-
 public class DefaultConfiguration extends Configuration {
 
-    
     // system property for dynamically added login configuration file location.
     private static final String JAVA_SECURITY_LOGIN_CONFIG = "java.security.auth.login.config"; //$NON-NLS-1$
 
     // location of login configuration file
     private static final String LOGIN_CONFIG_URL_PREFIX = "login.config.url."; //$NON-NLS-1$
-    
+
     // default a config file from user's home directory
     private static final String JAVA_LOGIN_CONF_FILE = "file:" + System.getProperty("user.home") + //$NON-NLS-1$ //$NON-NLS-2$
-                                                        + File.separatorChar + ".java.login.config"; //$NON-NLS-1$
+            +File.separatorChar + ".java.login.config"; //$NON-NLS-1$
 
     // creates a AuthPermission object 
-    private static final AuthPermission REFRESH_LOGIN_CONFIGURATION = new AuthPermission("refreshLoginConfiguration"); //$NON-NLS-1$
+    private static final AuthPermission REFRESH_LOGIN_CONFIGURATION = new AuthPermission(
+            "refreshLoginConfiguration"); //$NON-NLS-1$
 
     // set of application entry
-    private Map configutations = Collections.synchronizedMap(new HashMap());
+    private Map<String, List<AppConfigurationEntry>> configutations = Collections
+            .synchronizedMap(new HashMap<String, List<AppConfigurationEntry>>());
 
-     /**
-      * Default a constructor
-      */
+    /**
+     * Default a constructor
+     */
     public DefaultConfiguration() {
+        super();
         try {
             init();
         } catch (Exception e) {
-            // TODO log warning
+            e.printStackTrace();
         }
     }
-    
-    /**
-     * @com.intel.drl.spec_ref 
-     */
-    public AppConfigurationEntry[] getAppConfigurationEntry(
-            String applicationName) {
 
-        LinkedList list = (LinkedList) configutations.get(applicationName);
+    @Override
+    public AppConfigurationEntry[] getAppConfigurationEntry(String applicationName) {
+
+        List<AppConfigurationEntry> list = configutations.get(applicationName);
 
-        if (list == null || list.size() == 0) {
+        if (list == null || list.isEmpty()) {
             return null;
         }
-        return (AppConfigurationEntry[]) list.toArray(new AppConfigurationEntry[list.size()]);
+        return list.toArray(new AppConfigurationEntry[list.size()]);
     }
 
-    /**
-     * @com.intel.drl.spec_ref 
-     */
+    @Override
     public synchronized void refresh() {
 
         SecurityManager sm = System.getSecurityManager();
@@ -108,42 +98,40 @@
         try {
             init();
         } catch (Exception e) {
-            //TODO: log warning
+            e.printStackTrace();
         }
     }
-    
-     /**
-      * Initialize a login configuration file
-      */ 
+
+    /**
+     * Initialize a login configuration file
+     */
     private void init() {
 
-        HashMap fresh = new HashMap();
-        Properties system = new Properties((Properties)AccessController
-                                            .doPrivileged(new PolicyUtils.SystemKit()));
+        Map<String, List<AppConfigurationEntry>> fresh = new HashMap<String, List<AppConfigurationEntry>>();
+        Properties system = new Properties(AccessController
+                .doPrivileged(new PolicyUtils.SystemKit()));
         system.setProperty("/", File.separator); //$NON-NLS-1$
-        URL[] policyLocations = PolicyUtils.getPolicyURLs(system,
-                JAVA_SECURITY_LOGIN_CONFIG, LOGIN_CONFIG_URL_PREFIX);
+        URL[] policyLocations = PolicyUtils.getPolicyURLs(system, JAVA_SECURITY_LOGIN_CONFIG,
+                LOGIN_CONFIG_URL_PREFIX);
 
-        for (int i = 0; i < policyLocations.length; i++) {
+        for (URL url : policyLocations) {
             try {
-                fresh.putAll(DefaultConfigurationParser.configParser(
-                        policyLocations[i], system, fresh));
+                fresh.putAll(DefaultConfigurationParser.configParser(url, system, fresh));
             } catch (Exception e) {
                 //TODO: log warning
                 //new SecurityException("Unable to load a login configuration file");
             }
         }
         // if location is not define then get a config file from user's directory 
-         if (policyLocations.length == 0) {
+        if (policyLocations.length == 0) {
             try {
-                fresh.putAll(DefaultConfigurationParser.configParser(new URL(JAVA_LOGIN_CONF_FILE),
-                        system, fresh));
+                fresh.putAll(DefaultConfigurationParser.configParser(new URL(
+                        JAVA_LOGIN_CONF_FILE), system, fresh));
             } catch (Exception e) {
                 //TODO: log warning
                 //throw new SecurityException ("Unable to load a login configuration file");
             }
         }
-         configutations = fresh;
+        configutations = fresh;
     }
-    
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfigurationParser.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfigurationParser.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfigurationParser.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfigurationParser.java Sat Sep 30 11:56:21 2006
@@ -15,16 +15,10 @@
  *  limitations under the License.
  */
 
-/**
-* @author Maxim V. Makarov
-* @version $Revision$
-*/
-
 package org.apache.harmony.auth.login;
 
 import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.StreamTokenizer;
@@ -33,6 +27,7 @@
 import java.security.PrivilegedActionException;
 import java.util.HashMap;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
@@ -41,15 +36,11 @@
 import org.apache.harmony.auth.internal.nls.Messages;
 import org.apache.harmony.security.fortress.PolicyUtils;
 
-
-
 /**
  * Auth configuration parser
  */
-
 public class DefaultConfigurationParser {
 
-
     // logging flag for debug
     private static final boolean debug = false;
 
@@ -57,41 +48,40 @@
      * Reads a login configuration file from a location to a stream,
      * defines applications name and entries
      * 
-     * @param location an URL of a configration file to be loaded
+     * @param location an URL of a configuration file to be loaded
      * @param system properties, used for property expansion
      * @param newConfig 
      * @return Map of applications name and entries
      * @throws Exception error while reading location or file syntax error 
      */
-    public static Map configParser(URL location, 
-                                   Properties system, 
-                                   Map newConfig) 
-            throws IOException, PrivilegedActionException, 
-                   DefaultConfigurationParser.InvalidFormatException {
-
-        
-        Reader source = new BufferedReader(new InputStreamReader((InputStream)AccessController
-                    .doPrivileged(new PolicyUtils.URLLoader(location))));
+    public static Map<String, List<AppConfigurationEntry>> configParser(URL location,
+            Properties system, Map<String, List<AppConfigurationEntry>> newConfig)
+            throws IOException, PrivilegedActionException,
+            DefaultConfigurationParser.InvalidFormatException {
+
+        Reader source = new BufferedReader(new InputStreamReader(AccessController
+                .doPrivileged(new PolicyUtils.URLLoader(location))));
         try {
-            newConfig =  scanStream(source, newConfig, system);
+            newConfig = scanStream(source, newConfig, system);
         } finally {
-            source.close();  
+            source.close();
         }
-        
-        return newConfig; 
+
+        return newConfig;
     }
-    
+
     /** 
      * Performs the main parsing loop. Starts with creating and configuring a
      * StreamTokenizer instance and then collects result to the passed map
      */
-    private static Map scanStream(Reader source, Map newConfig, Properties system) throws IOException,
-                                    InvalidFormatException{
-        
-        LinkedList entriesList;
-        
+    private static Map<String, List<AppConfigurationEntry>> scanStream(Reader source,
+            Map<String, List<AppConfigurationEntry>> newConfig, Properties system)
+            throws IOException, InvalidFormatException {
+
+        List<AppConfigurationEntry> entriesList;
+
         StreamTokenizer st = new StreamTokenizer(source);
-             
+
         st.slashSlashComments(true);
         st.slashStarComments(true);
         st.eolIsSignificant(false);
@@ -103,12 +93,12 @@
 
         st.nextToken();
         while (st.ttype != StreamTokenizer.TT_EOF) {
-            entriesList = new LinkedList();
+            entriesList = new LinkedList<AppConfigurationEntry>();
 
             String appName = null;
             String loginModuleName = null;
             AppConfigurationEntry.LoginModuleControlFlag flag;
-            HashMap options;
+            Map<String, ?> options;
 
             appName = parseApplicationName(st);
             hasToken(st, '{');
@@ -116,22 +106,22 @@
                 loginModuleName = parseModuleClass(st);
                 flag = parseControlFlag(st);
                 options = parseModuleOptions(st, system);
-                AppConfigurationEntry entry = new AppConfigurationEntry(
-                    loginModuleName, flag, options);
+                AppConfigurationEntry entry = new AppConfigurationEntry(loginModuleName, flag,
+                        options);
                 entriesList.add(entry);
 
                 if (debug) {
-                   System.out.println("loginModuleName: " + loginModuleName); //$NON-NLS-1$
-                   System.out.println("flag: " + flag.toString()); //$NON-NLS-1$
-                   System.out.println("options: " + options.toString()); //$NON-NLS-1$
+                    System.out.println("loginModuleName: " + loginModuleName); //$NON-NLS-1$
+                    System.out.println("flag: " + flag.toString()); //$NON-NLS-1$
+                    System.out.println("options: " + options.toString()); //$NON-NLS-1$
                 }
             }
             hasToken(st, '}');
             hasToken(st, ';');
-        
+
             if (newConfig.containsKey(appName)) {
                 throw new InvalidFormatException(Messages.getString("auth.4B", appName)); //$NON-NLS-1$
-            } 
+            }
             newConfig.put(appName, entriesList);
         }
         return newConfig;
@@ -143,11 +133,11 @@
      * @throws IOException if stream reading failed
      * @throws InvalidFormatException if unexpected or unknown token encountered
      */
-    private static String parseApplicationName(StreamTokenizer st)
-        throws IOException, InvalidFormatException {
+    private static String parseApplicationName(StreamTokenizer st) throws IOException,
+            InvalidFormatException {
 
         if (st.ttype != StreamTokenizer.TT_WORD) {
-            throw new InvalidFormatException(Messages.getString("auth.4C",st.toString())); //$NON-NLS-1$
+            throw new InvalidFormatException(Messages.getString("auth.4C", st.toString())); //$NON-NLS-1$
         }
 
         String appName = st.sval;
@@ -163,8 +153,8 @@
     /**
      * Defines a login module name token
      */
-    private static String parseModuleClass(StreamTokenizer st)
-        throws IOException, InvalidFormatException {
+    private static String parseModuleClass(StreamTokenizer st) throws IOException,
+            InvalidFormatException {
 
         if (st.ttype != StreamTokenizer.TT_WORD) {
             throw new InvalidFormatException(Messages.getString("auth.4E", st.toString())); //$NON-NLS-1$
@@ -175,8 +165,8 @@
     /**
      * Defines a control flag token
      */
-    private static AppConfigurationEntry.LoginModuleControlFlag parseControlFlag(StreamTokenizer st)
-        throws IOException, InvalidFormatException {
+    private static AppConfigurationEntry.LoginModuleControlFlag parseControlFlag(
+            StreamTokenizer st) throws IOException, InvalidFormatException {
 
         st.nextToken();
 
@@ -196,13 +186,13 @@
     /**
      * Defines map of options
      */
-    private static HashMap parseModuleOptions(StreamTokenizer st, Properties system)
-        throws IOException, InvalidFormatException {
+    private static Map<String, ?> parseModuleOptions(StreamTokenizer st, Properties system)
+            throws IOException, InvalidFormatException {
 
-        HashMap options = new HashMap();
+        Map<String, Object> options = new HashMap<String, Object>();
 
         st.nextToken();
-        
+
         while (st.ttype != ';') {
             String key = null;
             String val = null;
@@ -216,12 +206,12 @@
                         try {
                             val = PolicyUtils.expand(st.sval, system);
                         } catch (Exception e) {
-                            //TODO: warning log
-                        } 
+                            e.printStackTrace();
+                        }
                     }
                 } else {
-                    throw new InvalidFormatException(
-                        Messages.getString("auth.50", st.toString())); //$NON-NLS-1$
+                    throw new InvalidFormatException(Messages.getString(
+                            "auth.50", st.toString())); //$NON-NLS-1$
                 }
             } else {
                 throw new InvalidFormatException(Messages.getString("auth.50", st.toString())); //$NON-NLS-1$
@@ -240,8 +230,8 @@
     /**
      * checks current token
      */
-    private static void hasToken(StreamTokenizer st, char ttype)
-        throws IOException, InvalidFormatException {
+    private static void hasToken(StreamTokenizer st, char ttype) throws IOException,
+            InvalidFormatException {
         if (st.ttype == ttype) {
             st.nextToken();
         } else {
@@ -254,10 +244,6 @@
      * 
      */
     public static class InvalidFormatException extends Exception {
-        
-        /**
-         * @serial
-         */
         private static final long serialVersionUID = -1676412136985823379L;
 
         /**
@@ -269,5 +255,4 @@
             super(message);
         }
     }
-
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/Krb5LoginModule.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/Krb5LoginModule.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/Krb5LoginModule.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/Krb5LoginModule.java Sat Sep 30 11:56:21 2006
@@ -54,13 +54,11 @@
 
     public void initialize(Subject subject, CallbackHandler callbackHandler,
             Map<String, ?> sharedState, Map<String, ?> options) {
-
         // TODO
         this.options = options;
     }
 
     public boolean login() throws LoginException {
-
         //TODO put in doPrivileged
         String kdc = System.getProperty(DEFAULT_KDC);
         String realm = System.getProperty(DEFAULT_REALM);
@@ -85,15 +83,14 @@
             kdc = kdc.substring(0, pos);
         }
 
-        PrincipalName cname = new PrincipalName(PrincipalName.NT_UNKNOWN,
-                new String[] { name });
+        PrincipalName cname = new PrincipalName(PrincipalName.NT_UNKNOWN, new String[] { name });
 
-        PrincipalName krbtgt = new PrincipalName(PrincipalName.NT_SRV_XHST,
-                new String[] { "krbtgt", realm }); //$NON-NLS-1$
+        PrincipalName krbtgt = new PrincipalName(PrincipalName.NT_SRV_XHST, new String[] {
+                "krbtgt", realm }); //$NON-NLS-1$
 
         try {
-            Ticket ticket = KrbClient.doAS(InetAddress.getByName(kdc), port,
-                    cname, realm, krbtgt);
+            Ticket ticket = KrbClient.doAS(InetAddress.getByName(kdc), port, cname, realm,
+                    krbtgt);
 
             return true; //FIXME 
         } catch (Exception e) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/ChannelBinding.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/ChannelBinding.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/ChannelBinding.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/ChannelBinding.java Sat Sep 30 11:56:21 2006
@@ -15,65 +15,43 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
 import java.net.InetAddress;
 import java.util.Arrays;
 
-/**
- * @com.intel.drl.spec_ref
- */
 public class ChannelBinding {
     //initiator address
     private InetAddress initAddr;
 
-    //aceptor address
+    //acceptor address
     private InetAddress acceptAddr;
 
     //application data
     private byte[] appData;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ChannelBinding(InetAddress initAddr, InetAddress acceptAddr,
-            byte[] appData) {
+    public ChannelBinding(InetAddress initAddr, InetAddress acceptAddr, byte[] appData) {
         this(appData);
         this.initAddr = initAddr;
         this.acceptAddr = acceptAddr;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ChannelBinding(byte[] appData) {
+        super();
         if (appData != null) {
             this.appData = new byte[appData.length];
             System.arraycopy(appData, 0, this.appData, 0, appData.length);
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public InetAddress getInitiatorAddress() {
         return initAddr;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public InetAddress getAcceptorAddress() {
         return acceptAddr;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public byte[] getApplicationData() {
         byte[] bytes = null;
         if (appData != null) {
@@ -83,9 +61,7 @@
         return bytes;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public boolean equals(Object obj) {
         if (this == obj) {
             return true;
@@ -100,17 +76,14 @@
         }
 
         if (acceptAddr != another.acceptAddr
-                && (acceptAddr == null || !acceptAddr
-                        .equals(another.acceptAddr))) {
+                && (acceptAddr == null || !acceptAddr.equals(another.acceptAddr))) {
             return false;
         }
 
         return Arrays.equals(appData, another.appData);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public int hashCode() {
         if (initAddr != null) {
             return initAddr.hashCode();
@@ -120,11 +93,11 @@
         }
         if (appData != null) {
             int hashCode = 0;
-            for (int i = 0; i < appData.length; ++i) {
-                hashCode = 31 * hashCode + appData[i];
+            for (byte element : appData) {
+                hashCode = 31 * hashCode + element;
             }
             return hashCode;
         }
         return 1;
     }
-}
\ No newline at end of file
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSContext.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSContext.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSContext.java Sat Sep 30 11:56:21 2006
@@ -15,241 +15,99 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
 import java.io.InputStream;
 import java.io.OutputStream;
 
-/**
- * @com.intel.drl.spec_ref
- */
 public interface GSSContext {
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final int DEFAULT_LIFETIME = 0;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final int INDEFINITE_LIFETIME = Integer.MAX_VALUE;//2147483647;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public byte[] initSecContext(byte[] inputBuf, int offset, int len)
-            throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int initSecContext(InputStream inStream, OutputStream outStream)
-            throws GSSException;
+    static final int DEFAULT_LIFETIME = 0;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public byte[] acceptSecContext(byte[] inToken, int offset, int len)
-            throws GSSException;
+    static final int INDEFINITE_LIFETIME = Integer.MAX_VALUE;//2147483647;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void acceptSecContext(InputStream inStream, OutputStream outStream)
-            throws GSSException;
+    byte[] initSecContext(byte[] inputBuf, int offset, int len) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean isEstablished();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void dispose() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize)
-            throws GSSException;
+    int initSecContext(InputStream inStream, OutputStream outStream) throws GSSException;
+
+    byte[] acceptSecContext(byte[] inToken, int offset, int len) throws GSSException;
+
+    void acceptSecContext(InputStream inStream, OutputStream outStream) throws GSSException;
+
+    boolean isEstablished();
+
+    void dispose() throws GSSException;
+
+    int getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public byte[] wrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
+    byte[] wrap(byte[] inBuf, int offset, int len, MessageProp msgProp) throws GSSException;
+
+    void wrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
             throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void wrap(InputStream inStream, OutputStream outStream,
-            MessageProp msgProp) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public byte[] unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
+    byte[] unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp) throws GSSException;
+
+    void unwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
             throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void unwrap(InputStream inStream, OutputStream outStream,
-            MessageProp msgProp) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public byte[] getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp)
+    byte[] getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp) throws GSSException;
+
+    void getMIC(InputStream inStream, OutputStream outStream, MessageProp msgProp)
             throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void getMIC(InputStream inStream, OutputStream outStream,
-            MessageProp msgProp) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void verifyMIC(byte[] inToken, int tokOffset, int tokLen,
-            byte[] inMsg, int msgOffset, int msgLen, MessageProp msgProp)
+    void verifyMIC(byte[] inToken, int tokOffset, int tokLen, byte[] inMsg, int msgOffset,
+            int msgLen, MessageProp msgProp) throws GSSException;
+
+    void verifyMIC(InputStream tokStream, InputStream msgStream, MessageProp msgProp)
             throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void verifyMIC(InputStream tokStream, InputStream msgStream,
-            MessageProp msgProp) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public byte[] export() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestMutualAuth(boolean state) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestReplayDet(boolean state) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestSequenceDet(boolean state) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestCredDeleg(boolean state) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestAnonymity(boolean state) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestConf(boolean state) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestInteg(boolean state) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void requestLifetime(int lifetime) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void setChannelBinding(ChannelBinding cb) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean getCredDelegState();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean getMutualAuthState();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean getReplayDetState();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean getSequenceDetState();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean getAnonymityState();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean isTransferable() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean isProtReady();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean getConfState();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean getIntegState();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int getLifetime();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public GSSName getSrcName() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public GSSName getTargName() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public Oid getMech() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public GSSCredential getDelegCred() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean isInitiator() throws GSSException;
+    byte[] export() throws GSSException;
+
+    void requestMutualAuth(boolean state) throws GSSException;
+
+    void requestReplayDet(boolean state) throws GSSException;
+
+    void requestSequenceDet(boolean state) throws GSSException;
+
+    void requestCredDeleg(boolean state) throws GSSException;
+
+    void requestAnonymity(boolean state) throws GSSException;
+
+    void requestConf(boolean state) throws GSSException;
+
+    void requestInteg(boolean state) throws GSSException;
+
+    void requestLifetime(int lifetime) throws GSSException;
+
+    void setChannelBinding(ChannelBinding cb) throws GSSException;
+
+    boolean getCredDelegState();
+
+    boolean getMutualAuthState();
+
+    boolean getReplayDetState();
+
+    boolean getSequenceDetState();
+
+    boolean getAnonymityState();
+
+    boolean isTransferable() throws GSSException;
+
+    boolean isProtReady();
+
+    boolean getConfState();
+
+    boolean getIntegState();
+
+    int getLifetime();
+
+    GSSName getSrcName() throws GSSException;
+
+    GSSName getTargName() throws GSSException;
+
+    Oid getMech() throws GSSException;
+
+    GSSCredential getDelegCred() throws GSSException;
 
-}
\ No newline at end of file
+    boolean isInitiator() throws GSSException;
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSCredential.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSCredential.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSCredential.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSCredential.java Sat Sep 30 11:56:21 2006
@@ -15,99 +15,42 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
-/**
- * @com.intel.drl.spec_ref
- */
 public interface GSSCredential extends Cloneable {
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final int ACCEPT_ONLY = 2;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final int DEFAULT_LIFETIME = 0;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final int INDEFINITE_LIFETIME = 2147483647;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final int INITIATE_AND_ACCEPT = 0;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final int INITIATE_ONLY = 1;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void add(GSSName name, int initLifetime, int acceptLifetime,
-            Oid mech, int usage) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void dispose() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean equals(Object another);
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public Oid[] getMechs() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public GSSName getName() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public GSSName getName(Oid mech) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int getRemainingAcceptLifetime(Oid mech) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int getRemainingInitLifetime(Oid mech) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int getRemainingLifetime() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int getUsage() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int getUsage(Oid mech) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int hashCode();
-}
\ No newline at end of file
+
+    static final int ACCEPT_ONLY = 2;
+
+    static final int DEFAULT_LIFETIME = 0;
+
+    static final int INDEFINITE_LIFETIME = Integer.MAX_VALUE; // 2147483647;
+
+    static final int INITIATE_AND_ACCEPT = 0;
+
+    static final int INITIATE_ONLY = 1;
+
+    void add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage)
+            throws GSSException;
+
+    void dispose() throws GSSException;
+
+    boolean equals(Object another);
+
+    Oid[] getMechs() throws GSSException;
+
+    GSSName getName() throws GSSException;
+
+    GSSName getName(Oid mech) throws GSSException;
+
+    int getRemainingAcceptLifetime(Oid mech) throws GSSException;
+
+    int getRemainingInitLifetime(Oid mech) throws GSSException;
+
+    int getRemainingLifetime() throws GSSException;
+
+    int getUsage() throws GSSException;
+
+    int getUsage(Oid mech) throws GSSException;
+
+    int hashCode();
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSException.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSException.java Sat Sep 30 11:56:21 2006
@@ -15,130 +15,57 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
-/**
- * @com.intel.drl.spec_ref
- */
 public class GSSException extends Exception {
 
     private static final long serialVersionUID = -2706218945227726672L;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int BAD_BINDINGS = 1;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int BAD_MECH = 2;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int BAD_MIC = 6;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int BAD_NAME = 3;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int BAD_NAMETYPE = 4;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int BAD_QOP = 14;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int BAD_STATUS = 5;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int CONTEXT_EXPIRED = 7;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int CREDENTIALS_EXPIRED = 8;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int DEFECTIVE_CREDENTIAL = 9;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int DEFECTIVE_TOKEN = 10;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int DUPLICATE_ELEMENT = 17;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int DUPLICATE_TOKEN = 19;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int FAILURE = 11;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int GAP_TOKEN = 22;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int NAME_NOT_MN = 18;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int NO_CONTEXT = 12;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int NO_CRED = 13;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int OLD_TOKEN = 20;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int UNAUTHORIZED = 15;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int UNAVAILABLE = 16;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static final int UNSEQ_TOKEN = 21;
 
-    //error messages
+    // error messages
     private static final String[] errorMessages = { "BAD BINDINGS", "BAD MECH", //$NON-NLS-1$ //$NON-NLS-2$
             "BAD NAME", "BAD NAMETYPE", "BAD STATUS", "BAD MIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
             "CONTEXT EXPIRED", "CREDENTIALS EXPIRED", "DEFECTIVE CREDENTIAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -146,61 +73,44 @@
             "UNAUTHORIZED", "UNAVAILABLE", "DUPLICATE ELEMENT", "NAME NOT MN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
             "DUPLICATE TOKEN", "OLD TOKEN", "UNSEQ TOKEN", "GAP TOKEN" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
-    //major code
+    // major code
     private int major = FAILURE;
 
-    //minor code
+    // minor code
     private int minor;
 
-    //minor string
+    // minor string
     private String minorMessage;
 
-    //major string
+    // major string
     private String majorString;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public GSSException(int majorCode) {
+        super();
         if (majorCode > 0 && majorCode <= 22) {
             this.major = majorCode;
         }
         this.majorString = errorMessages[major - 1];
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public GSSException(int majorCode, int minorCode, String minorString) {
         this(majorCode);
         this.minor = minorCode;
         this.minorMessage = minorString;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public int getMajor() {
         return major;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public String getMajorString() {
         return majorString;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public int getMinor() {
         return minor;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public String getMinorString() {
         if (minor == 0) {
             return null;
@@ -208,9 +118,7 @@
         return minorMessage;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public String getMessage() {
         String tmp = getMinorString();
         String tmp2 = getMajorString();
@@ -220,17 +128,12 @@
         return tmp2 + " (" + tmp + ')'; //$NON-NLS-1$
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void setMinor(int minorCode, String minorString) {
         this.minor = minorCode;
         this.minorMessage = minorString;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public String toString() {
         return "GSSException: " + getMessage(); //$NON-NLS-1$
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSManager.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSManager.java Sat Sep 30 11:56:21 2006
@@ -15,10 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
 import java.security.AccessController;
@@ -26,111 +22,52 @@
 
 import org.apache.harmony.security.fortress.PolicyUtils;
 
-
-/**
- * @com.intel.drl.spec_ref
- */
 public abstract class GSSManager {
 
     static final String MANAGER = "jgss.spi.manager"; //$NON-NLS-1$
 
     /**
-     * @com.intel.drl.spec_ref The implementation class name should be specified
-     *                         via &quot;jgss.spi.manager&quot; security
-     *                         property.
-     * @throws SecurityException
-     *             if manager instance cannot be created
+     * The implementation class name should be specified via
+     * &quot;jgss.spi.manager&quot; security property.
+     * 
+     * @throws SecurityException if manager instance cannot be created
      */
     public static GSSManager getInstance() {
-        return (GSSManager) AccessController
-                .doPrivileged(new PolicyUtils.ProviderLoader(MANAGER,
-                        GSSManager.class));
+        return AccessController.doPrivileged(new PolicyUtils.ProviderLoader<GSSManager>(
+                MANAGER, GSSManager.class));
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public abstract Oid[] getMechs();
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public abstract Oid[] getNamesForMech(Oid mech) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public abstract Oid[] getMechsForName(Oid nameType);
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSName createName(String nameStr, Oid nameType)
-            throws GSSException;
+    public abstract GSSName createName(String nameStr, Oid nameType) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSName createName(byte[] name, Oid nameType)
-            throws GSSException;
+    public abstract GSSName createName(byte[] name, Oid nameType) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public abstract GSSName createName(String nameStr, Oid nameType, Oid mech)
             throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSName createName(byte[] name, Oid nameType, Oid mech)
-            throws GSSException;
+    public abstract GSSName createName(byte[] name, Oid nameType, Oid mech) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSCredential createCredential(int usage)
-            throws GSSException;
+    public abstract GSSCredential createCredential(int usage) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSCredential createCredential(GSSName name, int lifetime,
-            Oid mech, int usage) throws GSSException;
+    public abstract GSSCredential createCredential(GSSName name, int lifetime, Oid mech,
+            int usage) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSCredential createCredential(GSSName name, int lifetime,
-            Oid[] mechs, int usage) throws GSSException;
+    public abstract GSSCredential createCredential(GSSName name, int lifetime, Oid[] mechs,
+            int usage) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSContext createContext(GSSName peer, Oid mech,
-            GSSCredential myCred, int lifetime) throws GSSException;
+    public abstract GSSContext createContext(GSSName peer, Oid mech, GSSCredential myCred,
+            int lifetime) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSContext createContext(GSSCredential myCred)
-            throws GSSException;
+    public abstract GSSContext createContext(GSSCredential myCred) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract GSSContext createContext(byte[] interProcessToken)
-            throws GSSException;
+    public abstract GSSContext createContext(byte[] interProcessToken) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract void addProviderAtFront(Provider p, Oid mech)
-            throws GSSException;
+    public abstract void addProviderAtFront(Provider p, Oid mech) throws GSSException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public abstract void addProviderAtEnd(Provider p, Oid mech)
-            throws GSSException;
+    public abstract void addProviderAtEnd(Provider p, Oid mech) throws GSSException;
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSName.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSName.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSName.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/GSSName.java Sat Sep 30 11:56:21 2006
@@ -15,94 +15,37 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
-/**
- * @com.intel.drl.spec_ref
- */
 public interface GSSName {
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final Oid NT_ANONYMOUS = new Oid(new int[] { 1, 3, 6, 1, 5,
-            6, 3 });
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final Oid NT_EXPORT_NAME = new Oid(new int[] { 1, 3, 6, 1, 5,
-            6, 4 });
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final Oid NT_HOSTBASED_SERVICE = new Oid(new int[] { 1, 3, 6,
-            1, 5, 6, 2 });
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final Oid NT_MACHINE_UID_NAME = new Oid(new int[] { 1, 2,
-            840, 113554, 1, 2, 1, 2 });
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final Oid NT_STRING_UID_NAME = new Oid(new int[] { 1, 2, 840,
-            113554, 1, 2, 1, 3 });
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static final Oid NT_USER_NAME = new Oid(new int[] { 1, 2, 840,
-            113554, 1, 2, 1, 1 });
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public GSSName canonicalize(Oid mech) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean equals(GSSName another) throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean equals(Object another);
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public byte[] export() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public Oid getStringNameType() throws GSSException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public int hashCode();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean isAnonymous();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public boolean isMN();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public String toString();
-}
\ No newline at end of file
+
+    static final Oid NT_ANONYMOUS = new Oid(new int[] { 1, 3, 6, 1, 5, 6, 3 });
+
+    static final Oid NT_EXPORT_NAME = new Oid(new int[] { 1, 3, 6, 1, 5, 6, 4 });
+
+    static final Oid NT_HOSTBASED_SERVICE = new Oid(new int[] { 1, 3, 6, 1, 5, 6, 2 });
+
+    static final Oid NT_MACHINE_UID_NAME = new Oid(new int[] { 1, 2, 840, 113554, 1, 2, 1, 2 });
+
+    static final Oid NT_STRING_UID_NAME = new Oid(new int[] { 1, 2, 840, 113554, 1, 2, 1, 3 });
+
+    static final Oid NT_USER_NAME = new Oid(new int[] { 1, 2, 840, 113554, 1, 2, 1, 1 });
+
+    GSSName canonicalize(Oid mech) throws GSSException;
+
+    boolean equals(GSSName another) throws GSSException;
+
+    boolean equals(Object another);
+
+    byte[] export() throws GSSException;
+
+    Oid getStringNameType() throws GSSException;
+
+    int hashCode();
+
+    boolean isAnonymous();
+
+    boolean isMN();
+
+    String toString();
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/MessageProp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/MessageProp.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/MessageProp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/MessageProp.java Sat Sep 30 11:56:21 2006
@@ -15,131 +15,86 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
-/**
- * @com.intel.drl.spec_ref
- */
 public class MessageProp {
 
-    //privacy state
+    // privacy state
     private boolean privState;
 
-    //quality-of-protection
-    private int qop /*= 0*/;
+    // quality-of-protection
+    private int qop /* = 0 */;
 
-    //duplicate token
+    // duplicate token
     private boolean duplicate;
 
-    //old token
+    // old token
     private boolean old;
 
-    //unseq
+    // unseq
     private boolean unseq;
 
-    //gap
+    // gap
     private boolean gap;
 
-    //minor status
-    private int minorStatus /*= 0*/;
+    // minor status
+    private int minorStatus /* = 0 */;
 
-    //minor status string
+    // minor status string
     private String minorString;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public MessageProp(boolean privState) {
+        super();
         this.privState = privState;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public MessageProp(int qop, boolean privState) {
         this(privState);
         this.qop = qop;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public int getQOP() {
         return qop;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean getPrivacy() {
         return privState;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean isDuplicateToken() {
         return duplicate;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean isOldToken() {
         return old;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean isUnseqToken() {
         return unseq;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean isGapToken() {
         return gap;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public int getMinorStatus() {
         return minorStatus;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public String getMinorString() {
         return minorString;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void setQOP(int qop) {
         this.qop = qop;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void setPrivacy(boolean privState) {
         this.privState = privState;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void setSupplementaryStates(boolean duplicate, boolean old,
-            boolean unseq, boolean gap, int minorStatus, String minorString) {
+    public void setSupplementaryStates(boolean duplicate, boolean old, boolean unseq,
+            boolean gap, int minorStatus, String minorString) {
         this.duplicate = duplicate;
         this.old = old;
         this.unseq = unseq;
@@ -147,4 +102,4 @@
         this.minorStatus = minorStatus;
         this.minorString = minorString;
     }
-}
\ No newline at end of file
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/Oid.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/Oid.java?view=diff&rev=451637&r1=451636&r2=451637
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/Oid.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/ietf/jgss/Oid.java Sat Sep 30 11:56:21 2006
@@ -15,10 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander V. Esin
-* @version $Revision$
-*/
 package org.ietf.jgss;
 
 import java.io.IOException;
@@ -28,32 +24,26 @@
 import org.apache.harmony.security.asn1.ASN1Oid;
 import org.apache.harmony.security.asn1.ObjectIdentifier;
 
-
-/**
- * @com.intel.drl.spec_ref
- */
 public class Oid {
-    
+
     // ASN.1 decoder/encoder
     private static final ASN1Oid ASN1 = ASN1Oid.getInstance();
-    
+
     //inner representation of Object Identifier
     private final ObjectIdentifier oid;
 
     //ASN.1 DER encoding
     private byte[] encoding;
 
-    //ctor for internal usage
     Oid(int[] data) {
+        super();
         oid = new ObjectIdentifier(data);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public Oid(byte[] data) throws GSSException {
+        super();
         try {
-            oid = new ObjectIdentifier((int[])ASN1.decode(data));
+            oid = new ObjectIdentifier((int[]) ASN1.decode(data));
         } catch (IOException e) {
             GSSException gsse = new GSSException(GSSException.FAILURE);
             gsse.initCause(e);
@@ -61,10 +51,8 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public Oid(InputStream derOid) throws GSSException {
+        super();
         if (derOid == null) {
             throw new NullPointerException();
         }
@@ -78,10 +66,8 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public Oid(String strOid) throws GSSException {
+        super();
         try {
             oid = new ObjectIdentifier(strOid);
         } catch (IllegalArgumentException e) {
@@ -91,9 +77,7 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public boolean equals(Object other) {
         if (this == other) {
             return true;
@@ -104,24 +88,18 @@
         return oid.equals(((Oid) other).oid);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean containedIn(Oid[] oids) {
         if (oids == null) {
             throw new NullPointerException(Messages.getString("auth.0D")); //$NON-NLS-1$
         }
-        for (int i = 0; i < oids.length; ++i) {
-            if (oid.equals(oids[i].oid)) {
+        for (Oid element : oids) {
+            if (oid.equals(element.oid)) {
                 return true;
             }
         }
         return false;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public byte[] getDER() throws GSSException {
         if (encoding == null) {
             encoding = ASN1.encode(oid.getOid());
@@ -131,17 +109,13 @@
         return enc;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public String toString() {
         return oid.toString();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public int hashCode() {
         return oid.hashCode();
     }
-}
\ No newline at end of file
+}



Mime
View raw message