You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ng...@apache.org on 2011/06/19 13:57:57 UTC

svn commit: r1137352 - /mina/ftpserver/branches/1.0.x/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java

Author: ngn
Date: Sun Jun 19 11:57:57 2011
New Revision: 1137352

URL: http://svn.apache.org/viewvc?rev=1137352&view=rev
Log:
Simplified hashCode() of NativeFtpFile (FTPSERVER-375)

Modified:
    mina/ftpserver/branches/1.0.x/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java

Modified: mina/ftpserver/branches/1.0.x/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java
URL: http://svn.apache.org/viewvc/mina/ftpserver/branches/1.0.x/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java?rev=1137352&r1=1137351&r2=1137352&view=diff
==============================================================================
--- mina/ftpserver/branches/1.0.x/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java (original)
+++ mina/ftpserver/branches/1.0.x/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java Sun Jun 19 11:57:57 2011
@@ -537,11 +537,10 @@ public class NativeFtpFile implements Ft
 
 	@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;
 		}
 	}
 }