Merge
authormullan
Tue, 29 Mar 2011 11:37:48 -0400
changeset 9012 c9c62baa6302
parent 9010 4c635f6cdfb1 (current diff)
parent 9011 c08eb9697ee4 (diff)
child 9013 eedac0b9f552
Merge
--- a/jdk/src/share/classes/com/sun/security/auth/PolicyParser.java	Tue Mar 29 08:15:16 2011 -0400
+++ b/jdk/src/share/classes/com/sun/security/auth/PolicyParser.java	Tue Mar 29 11:37:48 2011 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,13 +30,14 @@
 import java.net.MalformedURLException;
 import java.net.SocketPermission;
 import java.net.URL;
+import java.security.GeneralSecurityException;
+import java.text.MessageFormat;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.LinkedList;
 import java.util.ListIterator;
 import java.util.Vector;
 import java.util.StringTokenizer;
-import java.security.GeneralSecurityException;
 import sun.security.util.PropertyExpander;
 
 /**
@@ -368,8 +369,8 @@
                                 "WILDCARD class but no WILDCARD name");
                     throw new ParsingException
                         (st.lineno(),
-                        rb.getString("can.not.specify.Principal.with.a.") +
-                        rb.getString("wildcard.class.without.a.wildcard.name"));
+                        rb.getString("can.not.specify.Principal.with.a." +
+                                     "wildcard.class.without.a.wildcard.name"));
                 }
 
                 try {
@@ -525,9 +526,10 @@
                                         rb.getString("number.") +
                                         String.valueOf(st.nval));
         case StreamTokenizer.TT_EOF:
-           throw new ParsingException
-                (rb.getString("expected.") + expect +
-                rb.getString(".read.end.of.file"));
+            MessageFormat form = new MessageFormat(
+                    rb.getString("expected.expect.read.end.of.file."));
+            Object[] source = {expect};
+            throw new ParsingException(form.format(source));
         case StreamTokenizer.TT_WORD:
             if (expect.equalsIgnoreCase(st.sval)) {
                 lookahead = st.nextToken();
--- a/jdk/src/share/classes/sun/security/tools/JarSigner.java	Tue Mar 29 08:15:16 2011 -0400
+++ b/jdk/src/share/classes/sun/security/tools/JarSigner.java	Tue Mar 29 11:37:48 2011 -0400
@@ -1238,8 +1238,6 @@
                 // Provide a helpful message when TSA is beyond a firewall
                 error(rb.getString("unable.to.sign.jar.") +
                 rb.getString("no.response.from.the.Timestamping.Authority.") +
-                rb.getString("When.connecting.from.behind.a.firewall.an.HTTP.or.HTTPS.proxy.may.need.to.be.specified.") +
-                rb.getString("Supply.the.following.options.to.jarsigner.") +
                 "\n  -J-Dhttp.proxyHost=<hostname>" +
                 "\n  -J-Dhttp.proxyPort=<portnumber>\n" +
                 rb.getString("or") +
--- a/jdk/src/share/classes/sun/security/tools/JarSignerResources.java	Tue Mar 29 08:15:16 2011 -0400
+++ b/jdk/src/share/classes/sun/security/tools/JarSignerResources.java	Tue Mar 29 11:37:48 2011 -0400
@@ -181,11 +181,9 @@
         {"TSA.location.", "TSA location: "},
         {"TSA.certificate.", "TSA certificate: "},
         {"no.response.from.the.Timestamping.Authority.",
-                "no response from the Timestamping Authority. "},
-        {"When.connecting.from.behind.a.firewall.an.HTTP.or.HTTPS.proxy.may.need.to.be.specified.",
-                "When connecting from behind a firewall an HTTP or HTTPS proxy may need to be specified. "},
-        {"Supply.the.following.options.to.jarsigner.",
-                "Supply the following options to jarsigner: "},
+                "no response from the Timestamping Authority. When connecting"
+                + " from behind a firewall an HTTP or HTTPS proxy may need to"
+                + " be specified. Supply the following options to jarsigner:"},
         {"or", "or"},
         {"Certificate.not.found.for.alias.alias.must.reference.a.valid.KeyStore.entry.containing.an.X.509.public.key.certificate.for.the",
                 "Certificate not found for: {0}.  {1} must reference a valid KeyStore entry containing an X.509 public key certificate for the Timestamping Authority."},
--- a/jdk/src/share/classes/sun/security/tools/KeyTool.java	Tue Mar 29 08:15:16 2011 -0400
+++ b/jdk/src/share/classes/sun/security/tools/KeyTool.java	Tue Mar 29 11:37:48 2011 -0400
@@ -1740,16 +1740,19 @@
                 KeyStore.TrustedCertificateEntry.class)) {
             // We have a trusted certificate entry
             Certificate cert = keyStore.getCertificate(alias);
+            Object[] source = {"trustedCertEntry"};
+            String mf = new MessageFormat(
+                    rb.getString("Entry.type.type.")).format(source) + "\n";
             if (verbose && (cert instanceof X509Certificate)) {
-                out.println(rb.getString("Entry.type.trustedCertEntry."));
+                out.println(mf);
                 printX509Cert((X509Certificate)cert, out);
             } else if (rfc) {
-                out.println(rb.getString("Entry.type.trustedCertEntry."));
+                out.println(mf);
                 dumpCert(cert, out);
             } else if (debug) {
                 out.println(cert.toString());
             } else {
-                out.println(rb.getString("trustedCertEntry."));
+                out.println("trustedCertEntry, ");
                 out.println(rb.getString("Certificate.fingerprint.SHA1.")
                             + getCertFingerPrint("SHA1", cert));
             }
@@ -1837,10 +1840,6 @@
             System.err.println(rb.getString
                 (".The.integrity.of.the.information.stored.in.the.srckeystore."));
             System.err.println(rb.getString
-                (".has.NOT.been.verified.In.order.to.verify.its.integrity."));
-            System.err.println(rb.getString
-                (".you.must.provide.the.srckeystore.password."));
-            System.err.println(rb.getString
                 (".WARNING.WARNING.WARNING."));
             System.err.println();
         }
@@ -3187,10 +3186,6 @@
         System.err.println(rb.getString
             (".The.integrity.of.the.information.stored.in.your.keystore."));
         System.err.println(rb.getString
-            (".has.NOT.been.verified.In.order.to.verify.its.integrity."));
-        System.err.println(rb.getString
-            (".you.must.provide.your.keystore.password."));
-        System.err.println(rb.getString
             (".WARNING.WARNING.WARNING."));
         System.err.println();
     }
--- a/jdk/src/share/classes/sun/security/util/AuthResources.java	Tue Mar 29 08:15:16 2011 -0400
+++ b/jdk/src/share/classes/sun/security/util/AuthResources.java	Tue Mar 29 11:37:48 2011 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -111,17 +111,15 @@
 
         // com.sun.security.auth.PolicyParser
         {"expected.keystore.type", "expected keystore type"},
-        {"can.not.specify.Principal.with.a.",
-                "can not specify Principal with a "},
-        {"wildcard.class.without.a.wildcard.name",
-                "wildcard class without a wildcard name"},
+        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
+                "can not specify Principal with a wildcard class without a wildcard name"},
         {"expected.codeBase.or.SignedBy", "expected codeBase or SignedBy"},
         {"only.Principal.based.grant.entries.permitted",
                 "only Principal-based grant entries permitted"},
         {"expected.permission.entry", "expected permission entry"},
         {"number.", "number "},
-        {"expected.", "expected "},
-        {".read.end.of.file", ", read end of file"},
+        {"expected.expect.read.end.of.file.",
+                "expected {0}, read end of file"},
         {"expected.read.end.of.file", "expected ';', read end of file"},
         {"line.", "line "},
         {".expected.", ": expected '"},
@@ -136,6 +134,9 @@
         {"SolarisNumericUserPrincipal.",
                 "SolarisNumericUserPrincipal: "},
         {"SolarisPrincipal.", "SolarisPrincipal: "},
+        // provided.null.name is the NullPointerException message when a
+        // developer incorrectly passes a null name to the constructor of
+        // subclasses of java.security.Principal
         {"provided.null.name", "provided null name"}
 
     };
--- a/jdk/src/share/classes/sun/security/util/Resources.java	Tue Mar 29 08:15:16 2011 -0400
+++ b/jdk/src/share/classes/sun/security/util/Resources.java	Tue Mar 29 11:37:48 2011 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -304,8 +304,6 @@
         {"Certificate.chain.length.", "Certificate chain length: "},
         {"Certificate.i.1.", "Certificate[{0,number,integer}]:"},
         {"Certificate.fingerprint.SHA1.", "Certificate fingerprint (SHA1): "},
-        {"Entry.type.trustedCertEntry.", "Entry type: trustedCertEntry\n"},
-        {"trustedCertEntry.", "trustedCertEntry,"},
         {"Keystore.type.", "Keystore type: "},
         {"Keystore.provider.", "Keystore provider: "},
         {"Your.keystore.contains.keyStore.size.entry",
@@ -378,21 +376,15 @@
         {"No.certificate.from.the.SSL.server",
                 "No certificate from the SSL server"},
 
-        // Translators of the following 5 pairs, ATTENTION:
-        // the next 5 string pairs are meant to be combined into 2 paragraphs,
-        // 1+3+4 and 2+3+5. make sure your translation also does.
         {".The.integrity.of.the.information.stored.in.your.keystore.",
-            "* The integrity of the information stored in your keystore  *"},
+            "* The integrity of the information stored in your keystore  *\n" +
+            "* has NOT been verified!  In order to verify its integrity, *\n" +
+            "* you must provide your keystore password.                  *"},
         {".The.integrity.of.the.information.stored.in.the.srckeystore.",
-            "* The integrity of the information stored in the srckeystore*"},
-        {".has.NOT.been.verified.In.order.to.verify.its.integrity.",
-            "* has NOT been verified!  In order to verify its integrity, *"},
-        {".you.must.provide.your.keystore.password.",
-            "* you must provide your keystore password.                  *"},
-        {".you.must.provide.the.srckeystore.password.",
+            "* The integrity of the information stored in the srckeystore*\n" +
+            "* has NOT been verified!  In order to verify its integrity, *\n" +
             "* you must provide the srckeystore password.                *"},
 
-
         {"Certificate.reply.does.not.contain.public.key.for.alias.",
                 "Certificate reply does not contain public key for <{0}>"},
         {"Incomplete.certificate.chain.in.reply",