diff options
author | smallsql <smallsql> | 2012-08-06 18:47:53 +0400 |
---|---|---|
committer | smallsql <smallsql> | 2012-08-06 18:47:53 +0400 |
commit | 15e88c2588563987aad1753be1d0df11bbcdc45e (patch) | |
tree | 2ba81671ef4bf17efc6e9340e649ed564ca741e5 /openjdk/sun/print | |
parent | 8b71ecabafcb935ffe309dceb3de2851efece779 (diff) |
Fix a ClassCastException in printerJob.defaultPage() if the default paper format is not a standard paper format. This can occur with label printer.
Diffstat (limited to 'openjdk/sun/print')
-rw-r--r-- | openjdk/sun/print/Win32PrintService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openjdk/sun/print/Win32PrintService.java b/openjdk/sun/print/Win32PrintService.java index 8f5ce3d1..a81730af 100644 --- a/openjdk/sun/print/Win32PrintService.java +++ b/openjdk/sun/print/Win32PrintService.java @@ -366,7 +366,7 @@ public class Win32PrintService implements PrintService { } else if (category == Media.class) { int rawKind = settings.get_DefaultPageSettings().get_PaperSize().get_RawKind(); if( rawKind > MEDIA_NAMES.length || rawKind < 1 || MEDIA_NAMES[ rawKind - 1 ] == null ){ // custom page format - return settings.get_DefaultPageSettings().get_PaperSize().get_PaperName(); + return findMatchingMedia( settings.get_DefaultPageSettings().get_PaperSize() ); } else { return MEDIA_NAMES[ rawKind - 1 ]; } |