db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1345818 - in /db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator: file/Fileset.java source/stream/PropertiesSourceFormat.java
Date Mon, 04 Jun 2012 03:05:40 GMT
Author: tfischer
Date: Mon Jun  4 03:05:40 2012
New Revision: 1345818

URL: http://svn.apache.org/viewvc?rev=1345818&view=rev
Log:
fix PMD violations

Modified:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java?rev=1345818&r1=1345817&r2=1345818&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/file/Fileset.java
Mon Jun  4 03:05:40 2012
@@ -493,13 +493,10 @@ public class Fileset
             {
                 continue;
             }
-            if ("..".equals(part))
+            if ("..".equals(part) && !normalizedParts.isEmpty())
             {
-                if (!normalizedParts.isEmpty())
-                {
-                    normalizedParts.remove(normalizedParts.size() - 1);
-                    continue;
-                }
+                normalizedParts.remove(normalizedParts.size() - 1);
+                continue;
             }
             normalizedParts.add(part);
         }

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java?rev=1345818&r1=1345817&r2=1345818&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/source/stream/PropertiesSourceFormat.java
Mon Jun  4 03:05:40 2012
@@ -26,6 +26,7 @@ import java.util.Properties;
 import java.util.Set;
 
 import org.apache.commons.collections.set.ListOrderedSet;
+import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.SourceException;
@@ -222,7 +223,9 @@ public final class PropertiesSourceForma
         @Override
         public int hashCode()
         {
-            return super.hashCode();
+            HashCodeBuilder hashCodeBuilder = new HashCodeBuilder();
+            hashCodeBuilder.append(keySet);
+            return hashCodeBuilder.toHashCode();
         }
 
         /**



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


Mime
View raw message