/hg/release/icedtea7-forest-2.1/jaxp: 2 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Thu Apr 18 07:57:39 PDT 2013


changeset 3ce1593f819e in /hg/release/icedtea7-forest-2.1/jaxp
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jaxp?cmd=changeset;node=3ce1593f819e
author: andrew
date: Thu Apr 18 14:38:10 2013 +0100

	6657673: Issues with JAXP
	Reviewed-by: alanb, lancea, ahgross, mullan


changeset 637c67303313 in /hg/release/icedtea7-forest-2.1/jaxp
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jaxp?cmd=changeset;node=637c67303313
author: andrew
date: Thu Apr 18 15:05:11 2013 +0100

	Added tag icedtea-2.1.8 for changeset 3ce1593f819e


diffstat:

 .hgtags                                                                                                     |    1 +
 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/classfile/JavaClass.java                              |    6 +-
 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/Class2HTML.java                                  |    3 +-
 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/ClassPath.java                                   |   20 +-
 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/JavaWrapper.java                                 |    3 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLMessages.java                                 |  106 ++--
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java                          |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java                       |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java                       |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java                       |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java                       |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java                       |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java                       |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java                    |   63 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java                       |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java                    |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java                    |   64 --
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java                           |   12 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/Process.java                                    |    6 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java                           |   10 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java                            |   14 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java               |    8 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java                    |   16 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java                        |    3 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java                        |    3 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java                      |    3 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java         |    3 +-
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java                        |   13 +
 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java               |   13 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java                        |   15 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java                          |   63 +--
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java                      |    4 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java                   |   11 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java                |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java                |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java                |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java                |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java                |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java                |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java             |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java                |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java             |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java             |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegexParser.java                   |    5 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java                     |    9 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java                  |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java                       |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java                           |   70 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java              |    9 +-
 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xpointer/XPointerMessageFormatter.java              |    8 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/DTMManager.java                                    |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources.java                             |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ca.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java                       |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java                          |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java                          |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java                       |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java                       |   66 ---
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLMessages.java                                   |   65 +--
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Catalog.java                                  |    6 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java                           |   17 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Resolver.java                                 |    6 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java                       |    4 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/Encodings.java                              |    5 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java                |    5 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToStream.java                               |    3 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/TreeWalker.java                             |    5 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/utils/Messages.java                         |  100 +----
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/TreeWalker.java                                  |    7 +-
 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java                         |  141 +----
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java                    |    6 +-
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java                         |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java                      |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java                      |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java                      |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java                      |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java                      |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java                      |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java                   |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java                      |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java                   |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java                   |   67 ---
 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHMessages.java                               |  216 ++++-----
 sources/jaxp_src/src/com/sun/xml/internal/stream/XMLEntityStorage.java                                      |    3 +-
 sources/jaxp_src/src/com/sun/xml/internal/stream/writers/WriterUtility.java                                 |    3 +-
 sources/jaxp_src/src/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java                           |    3 +-
 sources/jaxp_src/src/javax/xml/datatype/FactoryFinder.java                                                  |   62 ++-
 sources/jaxp_src/src/javax/xml/parsers/FactoryFinder.java                                                   |    9 +-
 sources/jaxp_src/src/javax/xml/stream/FactoryFinder.java                                                    |   77 ++-
 sources/jaxp_src/src/javax/xml/transform/FactoryFinder.java                                                 |    8 +
 sources/jaxp_src/src/javax/xml/validation/SchemaFactoryFinder.java                                          |   41 +-
 sources/jaxp_src/src/javax/xml/xpath/XPathFactoryFinder.java                                                |   28 +-
 sources/jaxp_src/src/org/w3c/dom/bootstrap/DOMImplementationRegistry.java                                   |   13 +-
 sources/jaxp_src/src/org/xml/sax/helpers/NewInstance.java                                                   |   38 +-
 sources/jaxp_src/src/org/xml/sax/helpers/ParserAdapter.java                                                 |    5 +-
 sources/jaxp_src/src/org/xml/sax/helpers/ParserFactory.java                                                 |   13 +-
 sources/jaxp_src/src/org/xml/sax/helpers/XMLReaderFactory.java                                              |   62 +-
 106 files changed, 694 insertions(+), 3223 deletions(-)

diffs (truncated from 6307 to 500 lines):

diff -r 691f82a0de0b -r 637c67303313 .hgtags
--- a/.hgtags	Mon Mar 04 19:34:17 2013 -0500
+++ b/.hgtags	Thu Apr 18 15:05:11 2013 +0100
@@ -154,3 +154,4 @@
 3cd118e6573deb6139bcf6247d2577748f529105 icedtea-2.1.5
 c4bf68441a8de2eadcef55a1311f6f18b3b813af icedtea-2.1.6
 efa047bf59e95a21fae000817a4a7fe30e057f4d icedtea-2.1.7
+3ce1593f819e0c137d69e69598d2305e15de51ad icedtea-2.1.8
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/classfile/JavaClass.java
--- a/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/classfile/JavaClass.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/classfile/JavaClass.java	Thu Apr 18 15:05:11 2013 +0100
@@ -63,6 +63,7 @@
 import  com.sun.org.apache.bcel.internal.util.ClassVector;
 import  com.sun.org.apache.bcel.internal.util.ClassQueue;
 import  com.sun.org.apache.bcel.internal.generic.Type;
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
 
 import  java.io.*;
 import  java.util.StringTokenizer;
@@ -77,6 +78,7 @@
  * class file.  Those interested in programatically generating classes
  * should see the <a href="../generic/ClassGen.html">ClassGen</a> class.
 
+ * @version $Id: JavaClass.java,v 1.4 2007-07-19 04:34:42 ofung Exp $
  * @see com.sun.org.apache.bcel.internal.generic.ClassGen
  * @author  <A HREF="mailto:markus.dahm at berlin.de">M. Dahm</A>
  */
@@ -451,9 +453,9 @@
     String debug = null, sep = null;
 
     try {
-      debug = System.getProperty("JavaClass.debug");
+      debug = SecuritySupport.getSystemProperty("JavaClass.debug");
       // Get path separator either / or \ usually
-      sep = System.getProperty("file.separator");
+      sep = SecuritySupport.getSystemProperty("file.separator");
     }
     catch (SecurityException e) {
         // falls through
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/Class2HTML.java
--- a/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/Class2HTML.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/Class2HTML.java	Thu Apr 18 15:05:11 2013 +0100
@@ -82,6 +82,7 @@
  * method in the Method's frame will jump to the appropiate method in
  * the Code frame.
  *
+ * @version $Id: Class2HTML.java,v 1.3 2007-07-19 04:34:52 ofung Exp $
  * @author <A HREF="mailto:markus.dahm at berlin.de">M. Dahm</A>
 */
 public class Class2HTML implements Constants
@@ -137,7 +138,7 @@
     ClassParser parser=null;
     JavaClass   java_class=null;
     String      zip_file = null;
-    char        sep = System.getProperty("file.separator").toCharArray()[0];
+    char        sep = SecuritySupport.getSystemProperty("file.separator").toCharArray()[0];
     String      dir = "." + sep; // Where to store HTML files
 
     try {
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/ClassPath.java
--- a/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/ClassPath.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/ClassPath.java	Thu Apr 18 15:05:11 2013 +0100
@@ -66,6 +66,7 @@
  * Responsible for loading (class) files from the CLASSPATH. Inspired by
  * sun.tools.ClassPath.
  *
+ * @version $Id: ClassPath.java,v 1.4 2007-07-19 04:34:52 ofung Exp $
  * @author  <A HREF="mailto:markus.dahm at berlin.de">M. Dahm</A>
  */
 public class ClassPath implements Serializable {
@@ -83,7 +84,7 @@
     ArrayList vec = new ArrayList();
 
     for(StringTokenizer tok=new StringTokenizer(class_path,
-                                                System.getProperty("path.separator"));
+                            SecuritySupport.getSystemProperty("path.separator"));
         tok.hasMoreTokens();)
     {
       String path = tok.nextToken();
@@ -92,7 +93,7 @@
         File file = new File(path);
 
         try {
-          if(file.exists()) {
+          if(SecuritySupport.getFileExists(file)) {
             if(file.isDirectory())
               vec.add(new Dir(path));
             else
@@ -143,8 +144,9 @@
         String name = tok.nextToken();
         File   file = new File(name);
 
-        if(file.exists())
+        if(SecuritySupport.getFileExists(file)) {
           list.add(name);
+        }
       }
     }
   }
@@ -159,9 +161,9 @@
     String class_path, boot_path, ext_path;
 
     try {
-      class_path = System.getProperty("java.class.path");
-      boot_path  = System.getProperty("sun.boot.class.path");
-      ext_path   = System.getProperty("java.ext.dirs");
+      class_path = SecuritySupport.getSystemProperty("java.class.path");
+      boot_path  = SecuritySupport.getSystemProperty("sun.boot.class.path");
+      ext_path   = SecuritySupport.getSystemProperty("java.ext.dirs");
     }
     catch (SecurityException e) {
         return "";
@@ -176,8 +178,8 @@
     getPathComponents(ext_path, dirs);
 
     for(Iterator e = dirs.iterator(); e.hasNext(); ) {
-      File     ext_dir    = new File((String)e.next());
-      String[] extensions = ext_dir.list(new FilenameFilter() {
+      File ext_dir = new File((String)e.next());
+      String[] extensions = SecuritySupport.getFileList(ext_dir, new FilenameFilter() {
         public boolean accept(File dir, String name) {
           name = name.toLowerCase();
           return name.endsWith(".zip") || name.endsWith(".jar");
@@ -342,7 +344,7 @@
       final File file = new File(dir + File.separatorChar +
                                  name.replace('.', File.separatorChar) + suffix);
 
-      return file.exists()? new ClassFile() {
+      return SecuritySupport.getFileExists(file)? new ClassFile() {
         public InputStream getInputStream() throws IOException { return new FileInputStream(file); }
 
         public String      getPath()        { try {
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/JavaWrapper.java
--- a/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/JavaWrapper.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/bcel/internal/util/JavaWrapper.java	Thu Apr 18 15:05:11 2013 +0100
@@ -72,6 +72,7 @@
  * <pre>java com.sun.org.apache.bcel.internal.util.JavaWrapper -Dbcel.classloader=foo.MyLoader &lt;real.class.name&gt; [arguments]</pre>
  * </p>
  *
+ * @version $Id: JavaWrapper.java,v 1.3 2007-07-19 04:34:52 ofung Exp $
  * @author  <A HREF="mailto:markus.dahm at berlin.de">M. Dahm</A>
  * @see ClassLoader
  */
@@ -79,7 +80,7 @@
   private java.lang.ClassLoader loader;
 
   private static java.lang.ClassLoader getClassLoader() {
-    String s = System.getProperty("bcel.classloader");
+    String s = SecuritySupport.getSystemProperty("bcel.classloader");
 
     if((s == null) || "".equals(s))
       s = "com.sun.org.apache.bcel.internal.util.ClassLoader";
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLMessages.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLMessages.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLMessages.java	Thu Apr 18 15:05:11 2013 +0100
@@ -22,68 +22,72 @@
  */
 package com.sun.org.apache.xalan.internal.res;
 
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
 import java.util.ListResourceBundle;
 
 import com.sun.org.apache.xpath.internal.res.XPATHMessages;
 
 /**
- * Sets things up for issuing error messages.  This class is misnamed, and
- * should be called XalanMessages, or some such.
+ * Sets things up for issuing error messages. This class is misnamed, and should
+ * be called XalanMessages, or some such.
+ *
  * @xsl.usage internal
  */
-public class XSLMessages extends XPATHMessages
-{
+public class XSLMessages extends XPATHMessages {
 
-  /** The language specific resource object for Xalan messages.  */
-  private static ListResourceBundle XSLTBundle = null;
+    /**
+     * The language specific resource object for Xalan messages.
+     */
+    private static ListResourceBundle XSLTBundle = null;
+    /**
+     * The class name of the Xalan error message string table.
+     */
+    private static final String XSLT_ERROR_RESOURCES =
+            "com.sun.org.apache.xalan.internal.res.XSLTErrorResources";
 
-  /** The class name of the Xalan error message string table.    */
-  private static final String XSLT_ERROR_RESOURCES =
-    "com.sun.org.apache.xalan.internal.res.XSLTErrorResources";
+    /**
+     * Creates a message from the specified key and replacement arguments,
+     * localized to the given locale.
+     *
+     * @param msgKey The key for the message text.
+     * @param args The arguments to be used as replacement text in the message
+     * created.
+     *
+     * @return The formatted message string.
+     */
+    public static String createMessage(String msgKey, Object args[]) //throws Exception
+    {
+        if (XSLTBundle == null) {
+            XSLTBundle = SecuritySupport.getResourceBundle(XSLT_ERROR_RESOURCES);
+        }
 
-  /**
-   * Creates a message from the specified key and replacement
-   * arguments, localized to the given locale.
-   *
-   * @param msgKey    The key for the message text.
-   * @param args      The arguments to be used as replacement text
-   *                  in the message created.
-   *
-   * @return The formatted message string.
-   */
-  public static final String createMessage(String msgKey, Object args[])  //throws Exception
-  {
-    if (XSLTBundle == null)
-      XSLTBundle = loadResourceBundle(XSLT_ERROR_RESOURCES);
+        if (XSLTBundle != null) {
+            return createMsg(XSLTBundle, msgKey, args);
+        } else {
+            return "Could not load any resource bundles.";
+        }
+    }
 
-    if (XSLTBundle != null)
+    /**
+     * Creates a message from the specified key and replacement arguments,
+     * localized to the given locale.
+     *
+     * @param msgKey The key for the message text.
+     * @param args The arguments to be used as replacement text in the message
+     * created.
+     *
+     * @return The formatted warning string.
+     */
+    public static String createWarning(String msgKey, Object args[]) //throws Exception
     {
-      return createMsg(XSLTBundle, msgKey, args);
+        if (XSLTBundle == null) {
+            XSLTBundle = SecuritySupport.getResourceBundle(XSLT_ERROR_RESOURCES);
+        }
+
+        if (XSLTBundle != null) {
+            return createMsg(XSLTBundle, msgKey, args);
+        } else {
+            return "Could not load any resource bundles.";
+        }
     }
-    else
-      return "Could not load any resource bundles.";
-  }
-
-  /**
-   * Creates a message from the specified key and replacement
-   * arguments, localized to the given locale.
-   *
-   * @param msgKey    The key for the message text.
-   * @param args      The arguments to be used as replacement text
-   *                  in the message created.
-   *
-   * @return The formatted warning string.
-   */
-  public static final String createWarning(String msgKey, Object args[])  //throws Exception
-  {
-    if (XSLTBundle == null)
-      XSLTBundle = loadResourceBundle(XSLT_ERROR_RESOURCES);
-
-    if (XSLTBundle != null)
-    {
-      return createMsg(XSLTBundle, msgKey, args);
-    }
-    else
-      return "Could not load any resource bundles.";
-  }
 }
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java	Thu Apr 18 15:05:11 2013 +0100
@@ -1448,68 +1448,4 @@
   public static final String QUERY_HEADER = "PATTERN ";
 
 
-  /**
-   *   Return a named ResourceBundle for a particular locale.  This method mimics the behavior
-   *   of ResourceBundle.getBundle().
-   *
-   *   @param className the name of the class that implements the resource bundle.
-   *   @return the ResourceBundle
-   *   @throws MissingResourceException
-   */
-  public static final XSLTErrorResources loadResourceBundle(String className)
-          throws MissingResourceException
-  {
-
-    Locale locale = Locale.getDefault();
-    String suffix = getResourceSuffix(locale);
-
-    try
-    {
-
-      // first try with the given locale
-      return (XSLTErrorResources) ResourceBundle.getBundle(className
-              + suffix, locale);
     }
-    catch (MissingResourceException e)
-    {
-      try  // try to fall back to en_US if we can't load
-      {
-
-        // Since we can't find the localized property file,
-        // fall back to en_US.
-        return (XSLTErrorResources) ResourceBundle.getBundle(className,
-                new Locale("en", "US"));
-      }
-      catch (MissingResourceException e2)
-      {
-
-        // Now we are really in trouble.
-        // very bad, definitely very bad...not going to get very far
-        throw new MissingResourceException(
-          "Could not load any resource bundles.", className, "");
-      }
-    }
-  }
-
-  /**
-   * Return the resource file suffic for the indicated locale
-   * For most locales, this will be based the language code.  However
-   * for Chinese, we do distinguish between Taiwan and PRC
-   *
-   * @param locale the locale
-   * @return an String suffix which canbe appended to a resource name
-   */
-  private static final String getResourceSuffix(Locale locale)
-  {
-
-    String suffix = "_" + locale.getLanguage();
-    String country = locale.getCountry();
-
-    if (country.equals("TW"))
-      suffix += "_" + country;
-
-    return suffix;
-  }
-
-
-}
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java	Thu Apr 18 15:05:11 2013 +0100
@@ -1448,68 +1448,4 @@
   public static final String QUERY_HEADER = "PATTERN ";
 
 
-  /**
-   *   Return a named ResourceBundle for a particular locale.  This method mimics the behavior
-   *   of ResourceBundle.getBundle().
-   *
-   *   @param className the name of the class that implements the resource bundle.
-   *   @return the ResourceBundle
-   *   @throws MissingResourceException
-   */
-  public static final XSLTErrorResources loadResourceBundle(String className)
-          throws MissingResourceException
-  {
-
-    Locale locale = Locale.getDefault();
-    String suffix = getResourceSuffix(locale);
-
-    try
-    {
-
-      // first try with the given locale
-      return (XSLTErrorResources) ResourceBundle.getBundle(className
-              + suffix, locale);
     }
-    catch (MissingResourceException e)
-    {
-      try  // try to fall back to en_US if we can't load
-      {
-
-        // Since we can't find the localized property file,
-        // fall back to en_US.
-        return (XSLTErrorResources) ResourceBundle.getBundle(className,
-                new Locale("en", "US"));
-      }
-      catch (MissingResourceException e2)
-      {
-
-        // Now we are really in trouble.
-        // very bad, definitely very bad...not going to get very far
-        throw new MissingResourceException(
-          "Could not load any resource bundles.", className, "");
-      }
-    }
-  }
-
-  /**
-   * Return the resource file suffic for the indicated locale
-   * For most locales, this will be based the language code.  However
-   * for Chinese, we do distinguish between Taiwan and PRC
-   *
-   * @param locale the locale
-   * @return an String suffix which canbe appended to a resource name
-   */
-  private static final String getResourceSuffix(Locale locale)
-  {
-
-    String suffix = "_" + locale.getLanguage();
-    String country = locale.getCountry();
-
-    if (country.equals("TW"))
-      suffix += "_" + country;
-
-    return suffix;
-  }
-
-
-}
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java	Thu Apr 18 15:05:11 2013 +0100
@@ -1448,68 +1448,4 @@
   public static final String QUERY_HEADER = "PATTERN ";
 
 
-  /**
-   *   Return a named ResourceBundle for a particular locale.  This method mimics the behavior
-   *   of ResourceBundle.getBundle().
-   *
-   *   @param className the name of the class that implements the resource bundle.
-   *   @return the ResourceBundle
-   *   @throws MissingResourceException
-   */
-  public static final XSLTErrorResources loadResourceBundle(String className)
-          throws MissingResourceException
-  {
-
-    Locale locale = Locale.getDefault();
-    String suffix = getResourceSuffix(locale);
-
-    try
-    {
-
-      // first try with the given locale
-      return (XSLTErrorResources) ResourceBundle.getBundle(className
-              + suffix, locale);
     }
-    catch (MissingResourceException e)
-    {
-      try  // try to fall back to en_US if we can't load
-      {
-
-        // Since we can't find the localized property file,
-        // fall back to en_US.
-        return (XSLTErrorResources) ResourceBundle.getBundle(className,
-                new Locale("en", "US"));
-      }
-      catch (MissingResourceException e2)
-      {
-
-        // Now we are really in trouble.
-        // very bad, definitely very bad...not going to get very far
-        throw new MissingResourceException(
-          "Could not load any resource bundles.", className, "");
-      }
-    }
-  }
-
-  /**
-   * Return the resource file suffic for the indicated locale
-   * For most locales, this will be based the language code.  However
-   * for Chinese, we do distinguish between Taiwan and PRC
-   *
-   * @param locale the locale
-   * @return an String suffix which canbe appended to a resource name
-   */
-  private static final String getResourceSuffix(Locale locale)
-  {
-
-    String suffix = "_" + locale.getLanguage();
-    String country = locale.getCountry();
-
-    if (country.equals("TW"))
-      suffix += "_" + country;
-
-    return suffix;
-  }
-
-
-}
diff -r 691f82a0de0b -r 637c67303313 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java	Mon Mar 04 19:34:17 2013 -0500
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java	Thu Apr 18 15:05:11 2013 +0100
@@ -1448,68 +1448,4 @@
   public static final String QUERY_HEADER = "PATTERN ";



More information about the distro-pkg-dev mailing list