Skip to content

Commit f9a8ed1

Browse files
author
Vladimir Kotal
committed
more Paths.get()
1 parent dbe5656 commit f9a8ed1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public void testStoreAndGet() throws Exception {
294294

295295
// test incremental update
296296
MercurialRepositoryTest.runHgCommand(reposRoot, "import",
297-
new File(getClass().getResource("/history/hg-export.txt").getFile()).getAbsolutePath());
297+
Paths.get(getClass().getResource("/history/hg-export.txt").toURI()).toString());
298298

299299
repo.createCache(cache, cache.getLatestCachedRevision(repo));
300300

@@ -374,7 +374,7 @@ public void testRenameFileThenDoIncrementalReindex() throws Exception {
374374

375375
// Import changesets which rename one of the files in the repository.
376376
MercurialRepositoryTest.runHgCommand(reposRoot, "import",
377-
getClass().getResource("/history/hg-export-renamed.txt").getPath());
377+
Paths.get(getClass().getResource("/history/hg-export-renamed.txt").toURI()).toString());
378378

379379
// Perform incremental reindex.
380380
repo.createCache(cache, cache.getLatestCachedRevision(repo));
@@ -446,7 +446,7 @@ public void testRenameFileThenDoIncrementalReindex() throws Exception {
446446

447447
// Add some changes and rename the file again.
448448
MercurialRepositoryTest.runHgCommand(reposRoot, "import",
449-
getClass().getResource("/history/hg-export-renamed-again.txt").getPath());
449+
Paths.get(getClass().getResource("/history/hg-export-renamed-again.txt").toURI()).toString());
450450

451451
// Perform incremental reindex.
452452
repo.createCache(cache, cache.getLatestCachedRevision(repo));
@@ -494,11 +494,11 @@ public void testRenamedFilePlusChangesBranched() throws Exception {
494494

495495
// Branch the repo and add one changeset.
496496
runHgCommand(reposRoot, "unbundle",
497-
new File(getClass().getResource("/history/hg-branch.bundle").getFile()).getAbsolutePath());
497+
Paths.get(getClass().getResource("/history/hg-branch.bundle").toURI()).toString());
498498

499499
// Import changesets which rename one of the files in the default branch.
500500
runHgCommand(reposRoot, "import",
501-
new File(getClass().getResource("/history/hg-export-renamed.txt").getFile()).getAbsolutePath());
501+
Paths.get(getClass().getResource("/history/hg-export-renamed.txt").toURI()).toString());
502502

503503
// Switch to the newly created branch.
504504
runHgCommand(reposRoot, "update", "mybranch");
@@ -516,7 +516,7 @@ public void testRenamedFilePlusChangesBranched() throws Exception {
516516

517517
// Import changesets which rename the file in the new branch.
518518
runHgCommand(reposRoot, "import",
519-
getClass().getResource("/history/hg-export-renamed-branched.txt").getPath());
519+
Paths.get(getClass().getResource("/history/hg-export-renamed-branched.txt").toURI()).toString());
520520

521521
// Perform incremental reindex.
522522
repo.createCache(cache, cache.getLatestCachedRevision(repo));

0 commit comments

Comments
 (0)