comparison flys-backend/src/main/java/de/intevation/flys/utils/FileTools.java @ 1207:7121a40671ff

HashedFile: Forget to call the file hashing so only the file lengths were compared. flys-backend/trunk@2316 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 11 Jul 2011 10:02:13 +0000
parents c7370734b872
children cc88db4a5b34
comparison
equal deleted inserted replaced
1206:c7370734b872 1207:7121a40671ff
146 146
147 @Override 147 @Override
148 public int compareTo(HashedFile other) { 148 public int compareTo(HashedFile other) {
149 if (length < other.length) return -1; 149 if (length < other.length) return -1;
150 if (length > other.length) return +1; 150 if (length > other.length) return +1;
151 return 0; 151 return compare(getHash(), other.getHash());
152 } 152 }
153 153
154 private static int compare(byte [] a, byte [] b) { 154 private static int compare(byte [] a, byte [] b) {
155 if (a.length < b.length) return -1; 155 if (a.length < b.length) return -1;
156 if (a.length > b.length) return +1; 156 if (a.length > b.length) return +1;

http://dive4elements.wald.intevation.org