You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by gg...@apache.org on 2005/08/22 03:20:16 UTC

svn commit: r234412 - /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java

Author: ggregory
Date: Sun Aug 21 18:20:12 2005
New Revision: 234412

URL: http://svn.apache.org/viewcvs?rev=234412&view=rev
Log:
Removed extra () layer.

Modified:
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java?rev=234412&r1=234411&r2=234412&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java Sun Aug 21 18:20:12 2005
@@ -695,8 +695,8 @@
      * @since Java 1.2
      */
     public static final String USER_COUNTRY = 
-        (getSystemProperty("user.country") == null ?
-            getSystemProperty("user.region") : getSystemProperty("user.country"));
+        getSystemProperty("user.country") == null ?
+            getSystemProperty("user.region") : getSystemProperty("user.country");
 
     /**
      * <p>The <code>user.dir</code> System Property. User's current working



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: svn commit: r234412 - /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java

Posted by Stephen Colebourne <sc...@btopenworld.com>.
ggregory@apache.org wrote:
>      public static final String USER_COUNTRY = 
> -        (getSystemProperty("user.country") == null ?
> -            getSystemProperty("user.region") : getSystemProperty("user.country"));
> +        getSystemProperty("user.country") == null ?
> +            getSystemProperty("user.region") : getSystemProperty("user.country");

I won't push this one too hard, but IMHO removing the () makes the code 
less readable. There is now no visual clue that this is a compound 
statement at the start of the statement.

But then I think the same about compound return statements...

Stephen



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org