fixed infinite number of authentication jobs resulting in heavy cpu load

This commit is contained in:
Sebastian Stenzel
2015-05-22 22:04:32 +02:00
parent 88f81d2682
commit 8845efb983

View File

@@ -107,6 +107,20 @@ public class CleartextLocatorFactory implements DavLocatorFactory {
return "Locator: " + relativeCleartextPath + " (Prefix: " + pathPrefix + ")";
}
@Override
public int hashCode() {
return relativeCleartextPath.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj instanceof CleartextLocator) {
final CleartextLocator other = (CleartextLocator) obj;
return relativeCleartextPath == null && other.relativeCleartextPath == null || relativeCleartextPath.equals(other.relativeCleartextPath);
} else {
return false;
}
}
}
}