harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r441351 - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth: internal/kerberos/v5/ internal/nls/ module/
Date Fri, 08 Sep 2006 02:36:19 GMT
Author: smishura
Date: Thu Sep  7 19:36:18 2006
New Revision: 441351

URL: http://svn.apache.org/viewvc?view=rev&rev=441351
Log:
Apply additional patch for HARMONY-1312 ([classlib][internationalization]Internationalization
of the auth module)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/KDCRequest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/PrincipalName.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/nls/messages.properties
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/Krb5LoginModule.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/KDCRequest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/KDCRequest.java?view=diff&rev=441351&r1=441350&r2=441351
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/KDCRequest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/KDCRequest.java
Thu Sep  7 19:36:18 2006
@@ -72,7 +72,7 @@
     public static KDCRequest createASRequest(PrincipalName cname, String realm) {
 
         PrincipalName krbtgt = new PrincipalName(PrincipalName.NT_SRV_XHST,
-                new String[] { "krbtgt", realm });
+                new String[] { "krbtgt", realm }); //$NON-NLS-1$
 
         return new KDCRequest(AS_REQ, cname, realm, krbtgt);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/PrincipalName.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/PrincipalName.java?view=diff&rev=441351&r1=441350&r2=441351
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/PrincipalName.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/internal/kerberos/v5/PrincipalName.java
Thu Sep  7 19:36:18 2006
@@ -90,14 +90,14 @@
     }
 
     public String toString() {
-        StringBuilder buf = new StringBuilder("Name: ");
+        StringBuilder buf = new StringBuilder("Name: "); //$NON-NLS-1$
 
         for (int i = 0; i < (name.length - 1); i++) {
             buf.append(name[i]);
             buf.append('/');
         }
         buf.append(name[name.length - 1]);
-        buf.append(", type: ");
+        buf.append(", type: "); //$NON-NLS-1$
         buf.append(type);
 
         return buf.toString();

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=441351&r1=441350&r2=441351
==============================================================================
--- 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
Thu Sep  7 19:36:18 2006
@@ -96,3 +96,4 @@
 auth.4F=\n\tInvalid control flag: {0}
 auth.50=\n\tInvalid options format {0}
 auth.51=\n\tInvalid token: {0}
+auth.52=Error code: {0}

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=441351&r1=441350&r2=441351
==============================================================================
--- 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
Thu Sep  7 19:36:18 2006
@@ -32,17 +32,18 @@
 import org.apache.harmony.auth.internal.kerberos.v5.KDCRequest;
 import org.apache.harmony.auth.internal.kerberos.v5.KerberosErrorMessage;
 import org.apache.harmony.auth.internal.kerberos.v5.PrincipalName;
+import org.apache.harmony.auth.internal.nls.Messages;
 import org.apache.harmony.security.asn1.DerInputStream;
 
 public class Krb5LoginModule implements LoginModule {
 
     private static final int BUF_SIZE = 1024;
 
-    private static final String PRINCIPAL = "cname";
+    private static final String PRINCIPAL = "cname"; //$NON-NLS-1$
 
-    private static final String REALM = "realm";
+    private static final String REALM = "realm"; //$NON-NLS-1$
 
-    private static final String KDC = "kdc";
+    private static final String KDC = "kdc"; //$NON-NLS-1$
 
     private Map<String, ?> options;
 
@@ -108,7 +109,8 @@
                 throw new RuntimeException();//FIXME
             } else if (in.tag == KerberosErrorMessage.ASN1.constrId) {
                 KerberosErrorMessage errMsg = KerberosErrorMessage.decode(in);
-                throw new LoginException("Error code: " + errMsg.getErrorCode());
+                // auth.52=Error code: {0}
+                throw new LoginException(Messages.getString("auth.52", errMsg.getErrorCode()));
//$NON-NLS-1$
             } else {
                 new LoginException(); //FIXME message
             }



Mime
View raw message