changeset 9875:75b48287a1b3 jdk8u25-b05

Merge
author asaha
date Thu, 26 Jun 2014 16:44:06 -0700
parents 2a054c389c16 0ee2d7cc9c54
children ebb5c84bca19
files .hgtags
diffstat 4 files changed, 28 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Jun 26 08:38:29 2014 -0700
+++ b/.hgtags	Thu Jun 26 16:44:06 2014 -0700
@@ -309,3 +309,4 @@
 7d0627679c9fdeaaaa9fe15c7cc11af0763621ec jdk8u25-b01
 b0277ec994b751ebb761814675352506cd56bcd6 jdk8u25-b02
 5606d84f30bab5ed4bc5776572edd469fb013e13 jdk8u25-b03
+40630cd55da8a2db7980249dc31af285965cb5e9 jdk8u25-b04
--- a/src/share/classes/java/util/ResourceBundle.java	Thu Jun 26 08:38:29 2014 -0700
+++ b/src/share/classes/java/util/ResourceBundle.java	Thu Jun 26 16:44:06 2014 -0700
@@ -2650,7 +2650,10 @@
                 } catch (ClassNotFoundException e) {
                 }
             } else if (format.equals("java.properties")) {
-                final String resourceName = toResourceName(bundleName, "properties");
+                final String resourceName = toResourceName0(bundleName, "properties");
+                if (resourceName == null) {
+                    return bundle;
+                }
                 final ClassLoader classLoader = loader;
                 final boolean reloadFlag = reload;
                 InputStream stream = null;
@@ -2804,7 +2807,10 @@
             }
             boolean result = false;
             try {
-                String resourceName = toResourceName(toBundleName(baseName, locale), format);
+                String resourceName = toResourceName0(toBundleName(baseName, locale), format);
+                if (resourceName == null) {
+                    return result;
+                }
                 URL url = loader.getResource(resourceName);
                 if (url != null) {
                     long lastModified = 0;
@@ -2938,6 +2944,15 @@
             sb.append(bundleName.replace('.', '/')).append('.').append(suffix);
             return sb.toString();
         }
+
+        private String toResourceName0(String bundleName, String suffix) {
+            // application protocol check
+            if (bundleName.contains("://")) {
+                return null;
+            } else {
+                return toResourceName(bundleName, suffix);
+            }
+        }
     }
 
     private static class SingleFormatControl extends Control {
--- a/src/solaris/classes/sun/print/CUPSPrinter.java	Thu Jun 26 08:38:29 2014 -0700
+++ b/src/solaris/classes/sun/print/CUPSPrinter.java	Thu Jun 26 16:44:06 2014 -0700
@@ -126,7 +126,7 @@
     /**
      * Returns array of MediaSizeNames derived from PPD.
      */
-    public MediaSizeName[] getMediaSizeNames() {
+    MediaSizeName[] getMediaSizeNames() {
         initMedia();
         return cupsMediaSNames;
     }
@@ -135,7 +135,7 @@
     /**
      * Returns array of Custom MediaSizeNames derived from PPD.
      */
-    public CustomMediaSizeName[] getCustomMediaSizeNames() {
+    CustomMediaSizeName[] getCustomMediaSizeNames() {
         initMedia();
         return cupsCustomMediaSNames;
     }
@@ -144,7 +144,7 @@
     /**
      * Returns array of MediaPrintableArea derived from PPD.
      */
-    public MediaPrintableArea[] getMediaPrintableArea() {
+    MediaPrintableArea[] getMediaPrintableArea() {
         initMedia();
         return cupsMediaPrintables;
     }
@@ -152,7 +152,7 @@
     /**
      * Returns array of MediaTrays derived from PPD.
      */
-    public MediaTray[] getMediaTrays() {
+    MediaTray[] getMediaTrays() {
         initMedia();
         return cupsMediaTrays;
     }
--- a/src/solaris/classes/sun/print/IPPPrintService.java	Thu Jun 26 08:38:29 2014 -0700
+++ b/src/solaris/classes/sun/print/IPPPrintService.java	Thu Jun 26 16:44:06 2014 -0700
@@ -993,7 +993,9 @@
 
     public synchronized Class[] getSupportedAttributeCategories() {
         if (supportedCats != null) {
-            return supportedCats;
+            Class<?> [] copyCats = new Class<?>[supportedCats.length];
+            System.arraycopy(supportedCats, 0, copyCats, 0, copyCats.length);
+            return copyCats;
         }
 
         initAttributes();
@@ -1050,7 +1052,9 @@
         }
         supportedCats = new Class[catList.size()];
         catList.toArray(supportedCats);
-        return supportedCats;
+        Class<?>[] copyCats = new Class<?>[supportedCats.length];
+        System.arraycopy(supportedCats, 0, copyCats, 0, copyCats.length);
+        return copyCats;
     }