harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r440675 [2/2] - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java: common/javax/security/auth/ common/javax/security/auth/callback/ common/javax/security/auth/kerberos/ common/javax/security/auth/login/ common/javax/s...
Date Wed, 06 Sep 2006 10:03:31 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/nls/messages.properties?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/nls/messages.properties
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/nls/messages.properties
Wed Sep  6 03:03:27 2006
@@ -14,3 +14,85 @@
 # 
 
 # messages for EN locale
+auth.00=Name can not be null
+auth.01=sid can not be null
+auth.02=sid can not be empty
+auth.03=Subject can not be null
+auth.04=options can not be null
+auth.05=Read-only Subject
+auth.06=uid can not be null
+auth.07=gid can not be null
+auth.08=Failed to load Subject-based policy
+auth.09=invalid AccessControlContext
+auth.0A=Set is read only
+auth.0B=Element is not instance of java.security.Principal
+auth.0C=Invalid argument class. MUST be instance of {0}
+auth.0D=Null oids were provided
+auth.0E=target name is null
+auth.0F=target name has a length of 0
+auth.10=Target name MUST have the following syntax: CredentialClass 1*(PrincipalClass "PrincipalName")
+auth.11=Action must be "read" only
+auth.12=invalid syntax: Principal Class can not be a wildcard (*) value if Principal Name
is not a wildcard (*) value 
+auth.13=name is null
+auth.14=Invalid prompt
+auth.15=Invalid default text
+auth.16=Invalid message type
+auth.17=invalid defaultOption
+auth.18=Invalid option type
+auth.19=invalid selection
+auth.1A=Invalid options
+auth.1B=specified selection is out of bounds
+auth.1C=Invalid choices
+auth.1D=Invalid default choices
+auth.1E=Invalid default name
+auth.1F=Invalid message
+auth.20=Name must have the following syntax: "subordinate service" "target service"
+auth.21=collection is read-only
+auth.22=invalid permission: {0}
+auth.23=Invalid principal name
+auth.24=Illegal character in realm name; one of: '/', ':', null
+auth.25=Invalid name type
+auth.26=name of the LoginModule is null or has a length of 0
+auth.27=invalid control flag
+auth.28=X509 certificate is null
+auth.29=Private key is null
+auth.2A=Alias is null
+auth.2B=Incorrect input encoding
+auth.2C=Input stream can not be null
+auth.2D=Incorrect input name
+auth.2E=Invalid actions mask
+auth.2F=service principal is null
+auth.30=service principal is empty
+auth.31=Implementation was not found for: 
+auth.32=mechanism is null
+auth.33=mechanisms is null
+auth.34=CallbackHandler can not be null
+auth.35=There is no "{0}" in Configuration or it's empty.
+auth.36=Could not get default callback handler.
+auth.37=Login attempt failed.
+auth.38=This LoginContext is not logged.
+auth.39=Could not load module {0}
+auth.3A=Could not instantiate module {0}
+auth.3B=ASN.1 encoding of this ticket is null
+auth.3C=client is null
+auth.3D=server is null
+auth.3E=session key is null
+auth.3F=authentication time is null
+auth.40=expiration time is null
+auth.41=An absolute expiration time can not be null for renewable tickets
+auth.42=Incorrect start or end time
+auth.43=This ticket is already destroyed
+auth.44=The ticket is not renewable
+auth.45=The allowable renew time is passed for this ticket
+auth.46=InetAddress is null
+auth.47=key is null
+auth.48=The key is destroyed
+auth.49=Unsupported algorithm
+auth.4A=Failed to generate DES key from password.
+auth.4B=\n\tApplication name [{0}] already exists
+auth.4C=\n\tInvalid application name {0}
+auth.4D=\nAppname: {0}
+auth.4E=\n\tInvalid LoginModule name {0}
+auth.4F=\n\tInvalid control flag: {0}
+auth.50=\n\tInvalid options format {0}
+auth.51=\n\tInvalid token: {0}

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=440675&r1=440674&r2=440675
==============================================================================
--- 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
Wed Sep  6 03:03:27 2006
@@ -54,17 +54,17 @@
 
     
     // system property for dynamically added login configuration file location.
-    private static final String JAVA_SECURITY_LOGIN_CONFIG = "java.security.auth.login.config";
+    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.";
+    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")
+
-                                                        + File.separatorChar + ".java.login.config";
+    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$
 
     // creates a AuthPermission object 
-    private static final AuthPermission REFRESH_LOGIN_CONFIGURATION = new AuthPermission("refreshLoginConfiguration");
+    private static final AuthPermission REFRESH_LOGIN_CONFIGURATION = new AuthPermission("refreshLoginConfiguration");
//$NON-NLS-1$
 
     // set of application entry
     private Map configutations = Collections.synchronizedMap(new HashMap());
@@ -119,7 +119,7 @@
         HashMap fresh = new HashMap();
         Properties system = new Properties((Properties)AccessController
                                             .doPrivileged(new PolicyUtils.SystemKit()));
-        system.setProperty("/", File.separator);
+        system.setProperty("/", File.separator); //$NON-NLS-1$
         URL[] policyLocations = PolicyUtils.getPolicyURLs(system,
                 JAVA_SECURITY_LOGIN_CONFIG, LOGIN_CONFIG_URL_PREFIX);
 

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=440675&r1=440674&r2=440675
==============================================================================
--- 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
Wed Sep  6 03:03:27 2006
@@ -37,6 +37,7 @@
 
 import javax.security.auth.login.AppConfigurationEntry;
 
+import org.apache.harmony.auth.internal.nls.Messages;
 import org.apache.harmony.security.fortress.PolicyUtils;
 
 
@@ -119,17 +120,16 @@
                 entriesList.add(entry);
 
                 if (debug) {
-                   System.out.println("loginModuleName: " + loginModuleName);
-                   System.out.println("flag: " + flag.toString());
-                   System.out.println("options: " + options.toString());
+                   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("\n\tApplication name" + " ["
-                    + appName + "] " + "already exists");
+                throw new InvalidFormatException(Messages.getString("auth.4B", appName));
//$NON-NLS-1$
             } 
             newConfig.put(appName, entriesList);
         }
@@ -146,14 +146,13 @@
         throws IOException, InvalidFormatException {
 
         if (st.ttype != StreamTokenizer.TT_WORD) {
-            throw new InvalidFormatException("\n\tInvalid application name "
-                                         + st.toString());
+            throw new InvalidFormatException(Messages.getString("auth.4C",st.toString()));
//$NON-NLS-1$
         }
 
         String appName = st.sval;
 
         if (debug) {
-            System.out.println("\nAppname: " + appName);
+            System.out.println(Messages.getString("auth.4D", appName)); //$NON-NLS-1$
         }
         st.nextToken();
 
@@ -167,8 +166,7 @@
         throws IOException, InvalidFormatException {
 
         if (st.ttype != StreamTokenizer.TT_WORD) {
-            throw new InvalidFormatException("\n\tInvalid LoginModule name "
-                                         + st.toString());
+            throw new InvalidFormatException(Messages.getString("auth.4E", st.toString()));
//$NON-NLS-1$
         }
         return st.sval;
     }
@@ -181,16 +179,16 @@
 
         st.nextToken();
 
-        if ("required".equalsIgnoreCase(st.sval)) {
+        if ("required".equalsIgnoreCase(st.sval)) { //$NON-NLS-1$
             return AppConfigurationEntry.LoginModuleControlFlag.REQUIRED;
-        } else if ("requisite".equalsIgnoreCase(st.sval)) {
+        } else if ("requisite".equalsIgnoreCase(st.sval)) { //$NON-NLS-1$
             return AppConfigurationEntry.LoginModuleControlFlag.REQUISITE;
-        } else if ("optional".equalsIgnoreCase(st.sval)) {
+        } else if ("optional".equalsIgnoreCase(st.sval)) { //$NON-NLS-1$
             return AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL;
-        } else if ("sufficient".equalsIgnoreCase(st.sval)) {
+        } else if ("sufficient".equalsIgnoreCase(st.sval)) { //$NON-NLS-1$
             return AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT;
         } else {
-            throw new InvalidFormatException("\n\tInvalid control flag: " + st.sval);
+            throw new InvalidFormatException(Messages.getString("auth.4F", st.sval)); //$NON-NLS-1$
         }
     }
 
@@ -222,11 +220,10 @@
                     }
                 } else {
                     throw new InvalidFormatException(
-                        "\n\tInvalid options format " + st.toString());
+                        Messages.getString("auth.50", st.toString())); //$NON-NLS-1$
                 }
             } else {
-                throw new InvalidFormatException("\n\tInvalid options format "
-                    + st.toString());
+                throw new InvalidFormatException(Messages.getString("auth.50", st.toString()));
//$NON-NLS-1$
             }
 
             if (key != null && val != null) {
@@ -247,8 +244,7 @@
         if (st.ttype == ttype) {
             st.nextToken();
         } else {
-            throw new InvalidFormatException("\n\tInvalid token: "
-                + st.toString());
+            throw new InvalidFormatException(Messages.getString("auth.51", st.toString()));
//$NON-NLS-1$
         }
     }
 

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=440675&r1=440674&r2=440675
==============================================================================
--- 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
Wed Sep  6 03:03:27 2006
@@ -138,12 +138,12 @@
     public static final int UNSEQ_TOKEN = 21;
 
     //error messages
-    private static final String[] errorMessages = { "BAD BINDINGS", "BAD MECH",
-            "BAD NAME", "BAD NAMETYPE", "BAD STATUS", "BAD MIC",
-            "CONTEXT EXPIRED", "CREDENTIALS EXPIRED", "DEFECTIVE CREDENTIAL",
-            "DEFECTIVE TOKEN", "FAILURE", "NO CONTEXT", "NO CRED", "BAD QOP",
-            "UNAUTHORIZED", "UNAVAILABLE", "DUPLICATE ELEMENT", "NAME NOT MN",
-            "DUPLICATE TOKEN", "OLD TOKEN", "UNSEQ TOKEN", "GAP TOKEN" };
+    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$
+            "DEFECTIVE TOKEN", "FAILURE", "NO CONTEXT", "NO CRED", "BAD QOP", //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+            "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
     private int major = FAILURE;
@@ -216,7 +216,7 @@
         if (tmp == null) {
             return tmp2;
         }
-        return tmp2 + " (" + tmp + ')';
+        return tmp2 + " (" + tmp + ')'; //$NON-NLS-1$
     }
 
     /**
@@ -231,6 +231,6 @@
      * @com.intel.drl.spec_ref
      */
     public String toString() {
-        return "GSSException: " + getMessage();
+        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=440675&r1=440674&r2=440675
==============================================================================
--- 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
Wed Sep  6 03:03:27 2006
@@ -31,7 +31,7 @@
  */
 public abstract class GSSManager {
 
-    static final String MANAGER = "jgss.spi.manager";
+    static final String MANAGER = "jgss.spi.manager"; //$NON-NLS-1$
 
     /**
      * @com.intel.drl.spec_ref The implementation class name should be specified

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=440675&r1=440674&r2=440675
==============================================================================
--- 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
Wed Sep  6 03:03:27 2006
@@ -23,6 +23,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.harmony.auth.internal.nls.Messages;
 import org.apache.harmony.security.asn1.ASN1Oid;
 import org.apache.harmony.security.asn1.ObjectIdentifier;
 
@@ -107,7 +108,7 @@
      */
     public boolean containedIn(Oid[] oids) {
         if (oids == null) {
-            throw new NullPointerException("Null oids were provided");
+            throw new NullPointerException(Messages.getString("auth.0D")); //$NON-NLS-1$
         }
         for (int i = 0; i < oids.length; ++i) {
             if (oid.equals(oids[i].oid)) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericGroupPrincipal.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericGroupPrincipal.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericGroupPrincipal.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericGroupPrincipal.java
Wed Sep  6 03:03:27 2006
@@ -23,6 +23,8 @@
 import java.io.Serializable;
 import java.security.Principal;
 
+import org.apache.harmony.auth.internal.nls.Messages;
+
 /**
  * This class represents a unix groupd by its group id. 
  */
@@ -48,7 +50,7 @@
      */
     public UnixNumericGroupPrincipal(String gid, boolean primary) {
         if (gid == null) {
-            throw new NullPointerException("gid can not be null");
+            throw new NullPointerException(Messages.getString("auth.07")); //$NON-NLS-1$
         }
         this.gid = Long.parseLong(gid);
         this.primary = primary;
@@ -102,10 +104,10 @@
      */
     public String toString() {
         if( gname == null ) {
-            return "UnixNumericGroupPrincipal, gid=" + gid;
+            return "UnixNumericGroupPrincipal, gid=" + gid; //$NON-NLS-1$
         }
         else {
-            return "UnixNumericGroupPrincipal, gid=" + gid+"; name="+gname;
+            return "UnixNumericGroupPrincipal, gid=" + gid+"; name="+gname; //$NON-NLS-1$
//$NON-NLS-2$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericUserPrincipal.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericUserPrincipal.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericUserPrincipal.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixNumericUserPrincipal.java
Wed Sep  6 03:03:27 2006
@@ -23,6 +23,8 @@
 import java.io.Serializable;
 import java.security.Principal;
 
+import org.apache.harmony.auth.internal.nls.Messages;
+
 /**
  * This class represents a unix user by its user id. 
  */
@@ -43,7 +45,7 @@
      */
     public UnixNumericUserPrincipal(String uid) {
         if (uid == null) {
-            throw new NullPointerException("uid can not be null");
+            throw new NullPointerException(Messages.getString("auth.06")); //$NON-NLS-1$
         }
         this.uid = Long.parseLong(uid);
     }
@@ -74,7 +76,7 @@
      * Returns String representation of this object.
      */
     public String toString() {
-        return "UnixNumericUserPrincipal, uid=" + uid;
+        return "UnixNumericUserPrincipal, uid=" + uid; //$NON-NLS-1$
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixPrincipal.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixPrincipal.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixPrincipal.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/UnixPrincipal.java
Wed Sep  6 03:03:27 2006
@@ -23,6 +23,8 @@
 import java.io.Serializable;
 import java.security.Principal;
 
+import org.apache.harmony.auth.internal.nls.Messages;
+
 /** 
  * This class represents a unix user by its name. 
  */
@@ -43,7 +45,7 @@
      */
     public UnixPrincipal(String name) {
         if (name == null) {
-            throw new NullPointerException("name can not be null");
+            throw new NullPointerException(Messages.getString("auth.00")); //$NON-NLS-1$
         }
         this.name = name;
     }
@@ -59,7 +61,7 @@
      * Returns string representation of this object
      */
     public String toString() {
-        return "UnixPrincipal, name=" + name;
+        return "UnixPrincipal, name=" + name; //$NON-NLS-1$
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixLoginModule.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixLoginModule.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixLoginModule.java
Wed Sep  6 03:03:27 2006
@@ -31,6 +31,7 @@
 import org.apache.harmony.auth.UnixNumericGroupPrincipal;
 import org.apache.harmony.auth.UnixNumericUserPrincipal;
 import org.apache.harmony.auth.UnixPrincipal;
+import org.apache.harmony.auth.internal.nls.Messages;
 
 
 /** 
@@ -58,10 +59,10 @@
     public void initialize(Subject subject, CallbackHandler callbackHandler,
             Map sharedState, Map options) {
         if (subject == null) {
-            throw new NullPointerException("Subject can not be null");
+            throw new NullPointerException(Messages.getString("auth.03")); //$NON-NLS-1$
         }
         if (options == null) {
-            throw new NullPointerException("options can not be null");
+            throw new NullPointerException(Messages.getString("auth.04")); //$NON-NLS-1$
         }
         this.subject = subject;
         // callbackHandler - unused
@@ -97,7 +98,7 @@
      */
     public boolean commit() throws LoginException {
         if (subject.isReadOnly()) {
-            throw new LoginException("read-only subject");
+            throw new LoginException(Messages.getString("auth.05")); //$NON-NLS-1$
         }
         Set ps = subject.getPrincipals();
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixSystem.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixSystem.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixSystem.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/linux/org/apache/harmony/auth/module/UnixSystem.java
Wed Sep  6 03:03:27 2006
@@ -64,7 +64,7 @@
      */
     public UnixSystem() {
         if (!loadLibDone) {
-            System.loadLibrary("hyauth");
+            System.loadLibrary("hyauth"); //$NON-NLS-1$
             loadLibDone = true;
         }
         load();
@@ -132,19 +132,19 @@
      */
     public String toString() {
         StringBuffer buf = new StringBuffer();
-        buf.append("UnixSystem: \n");
-        buf.append("uid:gid=").append(uid).append(":").append(gid);
-        buf.append("=");
-        buf.append(username).append(":").append(groupname);
-        buf.append("\n");
+        buf.append("UnixSystem: \n"); //$NON-NLS-1$
+        buf.append("uid:gid=").append(uid).append(":").append(gid); //$NON-NLS-1$ //$NON-NLS-2$
+        buf.append("="); //$NON-NLS-1$
+        buf.append(username).append(":").append(groupname); //$NON-NLS-1$
+        buf.append("\n"); //$NON-NLS-1$
 
-        buf.append("total groups: ");
+        buf.append("total groups: "); //$NON-NLS-1$
         buf.append(groups == null ? 0 : groups.length);
 
         if (groups != null) {
-            buf.append("\n");
+            buf.append("\n"); //$NON-NLS-1$
             for (int i = 0; i < groups.length; i++) {
-                buf.append(i).append(") ").append(groupsNames[i]).append("\n");
+                buf.append(i).append(") ").append(groupsNames[i]).append("\n"); //$NON-NLS-1$
//$NON-NLS-2$
             }
         }
         return buf.toString();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTDomainPrincipal.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTDomainPrincipal.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTDomainPrincipal.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTDomainPrincipal.java
Wed Sep  6 03:03:27 2006
@@ -23,6 +23,8 @@
 import java.security.Principal;
 import java.io.Serializable;
 
+import org.apache.harmony.auth.internal.nls.Messages;
+
 /** 
  * A Principal which stores information NT domain name 
  */
@@ -42,7 +44,7 @@
      */
     public NTDomainPrincipal(String name) {
         if (name == null) {
-            throw new NullPointerException("name can not be null");
+            throw new NullPointerException(Messages.getString("auth.00")); //$NON-NLS-1$
         }
         this.name = name;
     }
@@ -80,6 +82,6 @@
      * Returns String representation of this object.
      */
     public String toString() {
-        return "NTDomainPrincipal: " + name;
+        return "NTDomainPrincipal: " + name; //$NON-NLS-1$
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTNumericCredential.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTNumericCredential.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTNumericCredential.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTNumericCredential.java
Wed Sep  6 03:03:27 2006
@@ -68,6 +68,6 @@
      * Returns String representation of this object.
      */
     public String toString() {
-        return "NTNumericCredential: 0x" + Long.toHexString(token);
+        return "NTNumericCredential: 0x" + Long.toHexString(token); //$NON-NLS-1$
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTSid.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTSid.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTSid.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTSid.java
Wed Sep  6 03:03:27 2006
@@ -23,6 +23,8 @@
 import java.security.Principal;
 import java.io.Serializable;
 
+import org.apache.harmony.auth.internal.nls.Messages;
+
 /** 
  * A Principal class which serves as a base class for many SID-based 
  * principals. 
@@ -49,10 +51,10 @@
      */
     public NTSid(String sid) {
         if (sid == null) {
-            throw new NullPointerException("sid can not be null");
+            throw new NullPointerException(Messages.getString("auth.01")); //$NON-NLS-1$
         }
         if (sid.length() == 0) {
-            throw new IllegalArgumentException("sid can not be empty");
+            throw new IllegalArgumentException(Messages.getString("auth.02")); //$NON-NLS-1$
         }
         this.sid = sid;
     }
@@ -104,9 +106,9 @@
     public String toString() {
         String str = getClass().getName();
         int dot = str.lastIndexOf('.');
-        str = str.substring(dot + 1) + ": ";
+        str = str.substring(dot + 1) + ": "; //$NON-NLS-1$
         str += name + '@' + domain;
-        str += "; SID=" + sid;
+        str += "; SID=" + sid; //$NON-NLS-1$
         return str;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTUserPrincipal.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTUserPrincipal.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTUserPrincipal.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/NTUserPrincipal.java
Wed Sep  6 03:03:27 2006
@@ -23,6 +23,8 @@
 import java.security.Principal;
 import java.io.Serializable;
 
+import org.apache.harmony.auth.internal.nls.Messages;
+
 /** 
  * A Principal which stores user name. 
  */
@@ -42,7 +44,7 @@
      */
     public NTUserPrincipal(String name) {
         if (name == null) {
-            throw new NullPointerException("name can not be null");
+            throw new NullPointerException(Messages.getString("auth.00")); //$NON-NLS-1$
         }
         this.name = name;
     }
@@ -58,7 +60,7 @@
      * Returns String representation of this object.
      */
     public String toString() {
-        return "NTUserPrincipal: name=" + name;
+        return "NTUserPrincipal: name=" + name; //$NON-NLS-1$
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTLoginModule.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTLoginModule.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTLoginModule.java
Wed Sep  6 03:03:27 2006
@@ -35,6 +35,7 @@
 import org.apache.harmony.auth.NTSidPrimaryGroupPrincipal;
 import org.apache.harmony.auth.NTSidUserPrincipal;
 import org.apache.harmony.auth.NTUserPrincipal;
+import org.apache.harmony.auth.internal.nls.Messages;
 
 
 /** 
@@ -72,16 +73,16 @@
     public void initialize(Subject subject, CallbackHandler cbHandler,
             Map sharedState, Map options) {
         if (subject == null) {
-            throw new NullPointerException("subject can not be null");
+            throw new NullPointerException(Messages.getString("auth.03")); //$NON-NLS-1$
         }
         if (options == null) {
-            throw new NullPointerException("options can not be null");
+            throw new NullPointerException(Messages.getString("auth.04")); //$NON-NLS-1$
         }
         this.subject = subject;
         //cbHandler - unused in this version
         //sharedState - unused
         this.options = options;
-        debug = "true".equalsIgnoreCase((String) options.get("debug"));
+        debug = "true".equalsIgnoreCase((String) options.get("debug")); //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     /**
@@ -113,7 +114,7 @@
      */
     public boolean commit() throws LoginException {
         if (subject.isReadOnly()) {
-            throw new LoginException("Read-only Subject");
+            throw new LoginException(Messages.getString("auth.05")); //$NON-NLS-1$
         }
         Set ps = subject.getPrincipals();
 
@@ -178,7 +179,7 @@
      */
     public boolean logout() throws LoginException {
         if (subject.isReadOnly()) {
-            throw new LoginException("Read-only Subject");
+            throw new LoginException(Messages.getString("auth.05")); //$NON-NLS-1$
         }
         Set ps = subject.getPrincipals();
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTSystem.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTSystem.java?view=diff&rev=440675&r1=440674&r2=440675
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTSystem.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/windows/org/apache/harmony/auth/module/NTSystem.java
Wed Sep  6 03:03:27 2006
@@ -59,7 +59,7 @@
      */
     public NTSystem() {
         if (!loadLibDone) {
-            System.loadLibrary("hyauth");
+            System.loadLibrary("hyauth"); //$NON-NLS-1$
             initNatives();
             loadLibDone = true;
         }
@@ -71,8 +71,8 @@
      */
     public NTSystem(Map options) {
         this();
-        debugNative = "true".equalsIgnoreCase((String) options
-                .get("debugNative"));
+        debugNative = "true".equalsIgnoreCase((String) options //$NON-NLS-1$
+                .get("debugNative")); //$NON-NLS-1$
     }
 
     /**
@@ -150,16 +150,16 @@
      * Returns a String representation of this object.
      */
     public String toString() {
-        String s = "NTSystem:\n";
-        s += "   user         : " + user + "\n";
-        s += "   domainSid    : " + domainSid + "\n";
-        s += "   mainGroup    : " + mainGroup + "\n";
-        s += "   token        : " + token + "\n";
-        s += "   groups count : " + (groups == null ? 0 : groups.length);
+        String s = "NTSystem:\n"; //$NON-NLS-1$
+        s += "   user         : " + user + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+        s += "   domainSid    : " + domainSid + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+        s += "   mainGroup    : " + mainGroup + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+        s += "   token        : " + token + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+        s += "   groups count : " + (groups == null ? 0 : groups.length); //$NON-NLS-1$
         if (groups != null) {
-            s += "\n";
+            s += "\n"; //$NON-NLS-1$
             for (int i = 0; i < groups.length; i++) {
-                s += "      " + i + "] " + groups[i] + "\n";
+                s += "      " + i + "] " + groups[i] + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
             }
         }
         return s;



Mime
View raw message