commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1339642 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
Date Thu, 17 May 2012 15:22:03 GMT
Author: ggregory
Date: Thu May 17 15:22:03 2012
New Revision: 1339642

URL: http://svn.apache.org/viewvc?rev=1339642&view=rev
Log:
Use ternary return expression instead of if-return/else-return.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java?rev=1339642&r1=1339641&r2=1339642&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
Thu May 17 15:22:03 2012
@@ -262,11 +262,7 @@ public class RamFileObject extends Abstr
      */
     int size()
     {
-        if (data == null)
-        {
-            return 0;
-        }
-        return data.size();
+        return data == null ? 0 : data.size();
     }
 
     /**



Mime
View raw message