You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2013/11/29 00:08:26 UTC

svn commit: r1546469 - in /tomee/tomee/trunk/container: openejb-core/src/main/java/org/apache/openejb/util/Duration.java openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java

Author: tveronezi
Date: Thu Nov 28 23:08:26 2013
New Revision: 1546469

URL: http://svn.apache.org/r1546469
Log:
it looks like it broke the build big time.
The new hashCode methods seem suspect.
Reverting and firing the build again.

Modified:
    tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/Duration.java
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/Duration.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/Duration.java?rev=1546469&r1=1546468&r2=1546469&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/Duration.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/Duration.java Thu Nov 28 23:08:26 2013
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
+@SuppressWarnings("PMD.OverrideBothEqualsAndHashcode")
 public class Duration {
 
     private long time;
@@ -157,13 +158,6 @@ public class Duration {
         return n.a == n.b;
     }
 
-    @Override
-    public int hashCode() {
-        int result = (int) (time ^ (time >>> 32));
-        result = 31 * result + (unit != null ? unit.hashCode() : 0);
-        return result;
-    }
-
     public Duration add(Duration that) {
         Normalize n = new Normalize(this, that);
         return new Duration(n.a + n.b, n.base);

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java?rev=1546469&r1=1546468&r2=1546469&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java Thu Nov 28 23:08:26 2013
@@ -21,6 +21,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.Hashtable;
 
+@SuppressWarnings("PMD.OverrideBothEqualsAndHashcode")
 public class FileUtils {
 
     private static final java.util.Random _random = new java.util.Random();
@@ -70,11 +71,6 @@ public class FileUtils {
         return this.getDirectory().equals(that.getDirectory());
     }
 
-    @Override
-    public int hashCode() {
-        return home != null ? home.hashCode() : 0;
-    }
-
     public File getDirectory(final String path, final boolean create) throws IOException {
         File dir = new File(home, path);
         dir = dir.getCanonicalFile();