jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java
changeset 27282 61ec4e8769b6
parent 27269 1ef2879dc7ad
parent 27082 7ab1aa5e8713
child 32865 f9cb6e427f9e
--- a/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java	Mon Oct 20 11:22:58 2014 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java	Mon Oct 20 12:04:12 2014 -0700
@@ -1002,7 +1002,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();
@@ -1065,7 +1067,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;
     }