Simplified hashCode() of NativeFtpFile (FTPSERVER-375) git-svn-id: https://svn.apache.org/repos/asf/mina/ftpserver/trunk@1137353 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/mina-ftpserver/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-ftpserver/commit/63bf7c86 Tree: http://git-wip-us.apache.org/repos/asf/mina-ftpserver/tree/63bf7c86 Diff: http://git-wip-us.apache.org/repos/asf/mina-ftpserver/diff/63bf7c86 Branch: refs/heads/trunk Commit: 63bf7c86aca31e85264d661d13cfe90b72f491fd Parents: b8f3543 Author: Niklas Gustavsson <[email protected]> Authored: Sun Jun 19 11:58:07 2011 +0000 Committer: Niklas Gustavsson <[email protected]> Committed: Sun Jun 19 11:58:07 2011 +0000 ---------------------------------------------------------------------- .../ftpserver/filesystem/nativefs/impl/NativeFtpFile.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-ftpserver/blob/63bf7c86/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java b/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java index c53f7c0..6e833dc 100644 --- a/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java +++ b/core/src/main/java/org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java @@ -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; } } }
