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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to