6850806: NPE exception throws in PrintServce.getSupportedAttributeValues
authorjgodinez
Fri, 18 Feb 2011 13:47:07 -0800
changeset 8365 803a1fd60835
parent 8364 07cd2e4eb172
child 8366 80ea422b84e8
child 8505 1f704178bb53
6850806: NPE exception throws in PrintServce.getSupportedAttributeValues Reviewed-by: igor, prr
jdk/src/windows/classes/sun/print/Win32PrintService.java
--- a/jdk/src/windows/classes/sun/print/Win32PrintService.java	Fri Feb 18 12:04:36 2011 -0800
+++ b/jdk/src/windows/classes/sun/print/Win32PrintService.java	Fri Feb 18 13:47:07 2011 -0800
@@ -1325,7 +1325,7 @@
             }
             if (trays != null) {
                 System.arraycopy(trays, 0, arr,
-                                 mediaSizeNames.length, trays.length);
+                                 len - trays.length, trays.length);
             }
             return arr;
         } else if (category == MediaPrintableArea.class) {