harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apavle...@apache.org
Subject svn commit: r596601 - /harmony/enhanced/classlib/trunk/modules/print/src/main/java/windows/org/apache/harmony/x/print/WinPrintServiceLookup.java
Date Tue, 20 Nov 2007 10:28:51 GMT
Author: apavlenko
Date: Tue Nov 20 02:28:50 2007
New Revision: 596601

URL: http://svn.apache.org/viewvc?rev=596601&view=rev
Log:
Fixed HARMONY-5138 ([classlib][print] HashAttributeTest fails if no default printer defined)

Modified:
    harmony/enhanced/classlib/trunk/modules/print/src/main/java/windows/org/apache/harmony/x/print/WinPrintServiceLookup.java

Modified: harmony/enhanced/classlib/trunk/modules/print/src/main/java/windows/org/apache/harmony/x/print/WinPrintServiceLookup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/print/src/main/java/windows/org/apache/harmony/x/print/WinPrintServiceLookup.java?rev=596601&r1=596600&r2=596601&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/print/src/main/java/windows/org/apache/harmony/x/print/WinPrintServiceLookup.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/print/src/main/java/windows/org/apache/harmony/x/print/WinPrintServiceLookup.java
Tue Nov 20 02:28:50 2007
@@ -30,8 +30,8 @@
     @Override
     public PrintService getDefaultPrintService() {
         try {
-            return new WinPrintService(WinPrinterFactory
-                            .getDefaultPrinterName());
+            final String name = WinPrinterFactory.getDefaultPrinterName();
+            return (name != null) ? new WinPrintService(name) : null;
         } catch (PrintException e) {
             return null;
         }



Mime
View raw message