harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r823945 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java
Date Sat, 10 Oct 2009 21:25:04 GMT
Author: ndbeyer
Date: Sat Oct 10 21:25:04 2009
New Revision: 823945

URL: http://svn.apache.org/viewvc?rev=823945&view=rev
Log:
adjust code, so that null check is appropriate

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

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java?rev=823945&r1=823944&r2=823945&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/JobAttributes.java
Sat Oct 10 21:25:04 2009
@@ -292,13 +292,14 @@
     public void setPageRanges(int[][] pr) {
         // awt.157=Invalid value for pageRanges
         String msg = Messages.getString("awt.157"); //$NON-NLS-1$
-        int n1 = 0;
-        int n2 = 0;
-        int prl = pr.length;
 
         if(pr == null) {
             throw new IllegalArgumentException(msg);
         }
+        
+        int n1 = 0;
+        int n2 = 0;
+        int prl = pr.length;
 
         for(int k = 0; k < prl; k++) {
             if(pr[k] == null || pr[k].length != 2



Mime
View raw message