commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1187572 - /commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/xmlrules/FromXmlRulesModule.java
Date Fri, 21 Oct 2011 21:59:53 GMT
Author: simonetripodi
Date: Fri Oct 21 21:59:53 2011
New Revision: 1187572

URL: http://svn.apache.org/viewvc?rev=1187572&view=rev
Log:
fixed PMD violation: These nested if statements could be combined

Modified:
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/xmlrules/FromXmlRulesModule.java

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/xmlrules/FromXmlRulesModule.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/xmlrules/FromXmlRulesModule.java?rev=1187572&r1=1187571&r2=1187572&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/xmlrules/FromXmlRulesModule.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/xmlrules/FromXmlRulesModule.java
Fri Oct 21 21:59:53 2011
@@ -103,7 +103,7 @@ public abstract class FromXmlRulesModule
     }
 
     /**
-     * 
+     *
      */
     protected abstract void loadRules();
 
@@ -122,12 +122,9 @@ public abstract class FromXmlRulesModule
         this.inputSource.add( inputSource );
 
         String systemId = inputSource.getSystemId();
-        if ( systemId != null )
+        if ( systemId != null && !systemIds.add( systemId ) )
         {
-            if ( !systemIds.add( systemId ) )
-            {
-                addError( "XML rules file '%s' already bound", systemId );
-            }
+            addError( "XML rules file '%s' already bound", systemId );
         }
     }
 



Mime
View raw message