Simplified hashCode() of NativeFtpFile (FTPSERVER-375)
authorNiklas Gustavsson <ngn@apache.org>
Sun, 19 Jun 2011 11:58:07 +0000 (11:58 +0000)
committerNiklas Gustavsson <ngn@apache.org>
Sun, 19 Jun 2011 11:58:07 +0000 (11:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/mina/ftpserver/trunk@1137353 13f79535-47bb-0310-9956-ffa450edef68

core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java

index c53f7c0..6e833dc 100644 (file)
@@ -415,11 +415,10 @@ public class NativeFtpFile implements FtpFile {
     
        @Override
        public int hashCode() {
-               final int prime = 31;
                try {
-                       return prime  + ((file == null) ? 0 : file.getCanonicalFile().hashCode());
+                       return file.getCanonicalFile().hashCode();
                } catch (IOException e) {
-                       return prime;
+                       return 0;
                }
        }
 }