index test corrected: ensure that contentId is non-negative

This commit is contained in:
nik
2015-02-13 18:51:59 +03:00
parent 38f38d75cf
commit c75fcb03ba
@@ -48,14 +48,14 @@ public class StringIndex {
}
public void update(final String path, @Nullable String content, @Nullable String oldContent) throws StorageException {
myIndex.update(path.hashCode(), toInput(path, content)).compute();
myIndex.update(Math.abs(path.hashCode()), toInput(path, content)).compute();
}
public void dispose() {
myIndex.dispose();
}
@Nullable
@Nullable
private PathContentPair toInput(@NotNull String path, @Nullable String content) {
return content != null ? new PathContentPair(path, content) : null;
}