harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r495763 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java
Date Fri, 12 Jan 2007 22:16:08 GMT
Author: hindessm
Date: Fri Jan 12 14:16:07 2007
New Revision: 495763

URL: http://svn.apache.org/viewvc?view=rev&rev=495763
Log:
Applied patch from "[#HARMONY-2433] [classlib][awt] Different order of
exceptions on j.a.print.Book.setPage(,,)".

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java?view=diff&rev=495763&r1=495762&r2=495763
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java
Fri Jan 12 14:16:07 2007
@@ -105,6 +105,14 @@
     public void setPage(int pageIndex, Printable painter, PageFormat page)
             throws IndexOutOfBoundsException {
 
+        if(painter == null) {
+            throw new NullPointerException(Messages.getString("awt.01", "painter")); //$NON-NLS-1$
+        }
+        
+        if(page == null) {
+            throw new NullPointerException(Messages.getString("awt.01", "page")); //$NON-NLS-1$
+        }
+        
         if (pageIndex >= getNumberOfPages()) {
             // awt.5E=pageIndex is more than book size
             throw new IndexOutOfBoundsException(Messages.getString("awt.5E")); //$NON-NLS-1$



Mime
View raw message