mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
index test corrected: ensure that contentId is non-negative
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user