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 11:50:49 UTC
svn commit: r1137325 -
/mina/ftpserver/branches/1.0.x/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java
Author: ngn
Date: Sun Jun 19 09:50:49 2011
New Revision: 1137325
URL: http://svn.apache.org/viewvc?rev=1137325&view=rev
Log:
Adding hashCode() to 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=1137325&r1=1137324&r2=1137325&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 09:50:49 2011
@@ -533,4 +533,15 @@ public class NativeFtpFile implements Ft
}
return false;
}
+
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ try {
+ return prime + ((file == null) ? 0 : file.getCanonicalFile().hashCode());
+ } catch (IOException e) {
+ return prime;
+ }
+ }
}