You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2007/01/12 23:16:08 UTC

svn commit: r495763 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java

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$