@@ -294,7 +294,7 @@ public void testStoreAndGet() throws Exception {
294
294
295
295
// test incremental update
296
296
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 ());
298
298
299
299
repo .createCache (cache , cache .getLatestCachedRevision (repo ));
300
300
@@ -374,7 +374,7 @@ public void testRenameFileThenDoIncrementalReindex() throws Exception {
374
374
375
375
// Import changesets which rename one of the files in the repository.
376
376
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 ());
378
378
379
379
// Perform incremental reindex.
380
380
repo .createCache (cache , cache .getLatestCachedRevision (repo ));
@@ -446,7 +446,7 @@ public void testRenameFileThenDoIncrementalReindex() throws Exception {
446
446
447
447
// Add some changes and rename the file again.
448
448
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 ());
450
450
451
451
// Perform incremental reindex.
452
452
repo .createCache (cache , cache .getLatestCachedRevision (repo ));
@@ -494,11 +494,11 @@ public void testRenamedFilePlusChangesBranched() throws Exception {
494
494
495
495
// Branch the repo and add one changeset.
496
496
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 ());
498
498
499
499
// Import changesets which rename one of the files in the default branch.
500
500
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 ());
502
502
503
503
// Switch to the newly created branch.
504
504
runHgCommand (reposRoot , "update" , "mybranch" );
@@ -516,7 +516,7 @@ public void testRenamedFilePlusChangesBranched() throws Exception {
516
516
517
517
// Import changesets which rename the file in the new branch.
518
518
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 ());
520
520
521
521
// Perform incremental reindex.
522
522
repo .createCache (cache , cache .getLatestCachedRevision (repo ));
0 commit comments