harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r823766 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java
Date Sat, 10 Oct 2009 02:20:45 GMT
Author: ndbeyer
Date: Sat Oct 10 02:20:44 2009
New Revision: 823766

URL: http://svn.apache.org/viewvc?rev=823766&view=rev
Log:
simplify if/else via ternary operator

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java?rev=823766&r1=823765&r2=823766&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java
Sat Oct 10 02:20:44 2009
@@ -192,8 +192,7 @@
     }
     
     public int[] getDirtyRegions(){
-        if(dirtyRegions != null) return dirtyRegions.rect;
-        else return null;
+        return (dirtyRegions == null ? null : dirtyRegions.rect);
     }
 
     /**



Mime
View raw message