commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1538032 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
Date Fri, 01 Nov 2013 18:51:20 GMT
Author: ggregory
Date: Fri Nov  1 18:51:20 2013
New Revision: 1538032

URL: http://svn.apache.org/r1538032
Log:
Statement unnecessarily nested within else clause.

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java?rev=1538032&r1=1538031&r2=1538032&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
Fri Nov  1 18:51:20 2013
@@ -364,9 +364,8 @@ public class XpmImageParser extends Imag
             loadColorNames();
             if (colorNames.containsKey(color)) {
                 return (colorNames.get(color)).intValue();
-            } else {
-                return 0x00000000;
             }
+            return 0x00000000;
         }
     }
     
@@ -645,9 +644,8 @@ public class XpmImageParser extends Imag
             final char zeroes[] = new char[6 - hex.length()];
             Arrays.fill(zeroes, '0');
             return "#" + new String(zeroes) + hex;
-        } else {
-            return "#" + hex;
         }
+        return "#" + hex;
     }
 
     @Override



Mime
View raw message