Skip to content

Commit dbe5656

Browse files
author
Vladimir Kotal
committed
try Paths.get()
1 parent 3bb5914 commit dbe5656

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/history/FileHistoryCacheTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.opengrok.indexer.util.TestRepository;
3434

3535
import java.io.File;
36+
import java.nio.file.Paths;
3637
import java.util.Date;
3738
import java.util.Iterator;
3839
import java.util.LinkedList;
@@ -170,7 +171,7 @@ public void testStoreAndGetIncrementalTags() throws Exception {
170171

171172
// Add bunch of changesets with file based changes and tags.
172173
MercurialRepositoryTest.runHgCommand(reposRoot, "import",
173-
new File(getClass().getResource("/history/hg-export-tag.txt").getFile()).getAbsolutePath());
174+
Paths.get(getClass().getResource("/history/hg-export-tag.txt").toURI()).toString());
174175

175176
// Perform incremental reindex.
176177
repo.createCache(cache, cache.getLatestCachedRevision(repo));

0 commit comments

Comments
 (0)