From c75fcb03ba62bedcf626f8e9d7377c140a63c66a Mon Sep 17 00:00:00 2001 From: nik Date: Fri, 13 Feb 2015 18:45:30 +0300 Subject: [PATCH] index test corrected: ensure that contentId is non-negative --- java/java-tests/testSrc/com/intellij/index/StringIndex.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/java-tests/testSrc/com/intellij/index/StringIndex.java b/java/java-tests/testSrc/com/intellij/index/StringIndex.java index 851a389679b8..b381d9afcd37 100644 --- a/java/java-tests/testSrc/com/intellij/index/StringIndex.java +++ b/java/java-tests/testSrc/com/intellij/index/StringIndex.java @@ -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; }