Skip to content

Commit 6497f1b

Browse files
MichalFoksaMichal Foksa
andauthored
Compare absolute paths. TestJava7Types failed on Windows due to absolute path starting with drive name. (#3513)
Co-authored-by: Michal Foksa <Michal.Foksa@external.t-mobile.at>
1 parent 1beaaa3 commit 6497f1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/com/fasterxml/jackson/databind/ext/TestJava7Types.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public void testPathRoundtrip() throws Exception
2020

2121
Path p = mapper.readValue(json, Path.class);
2222
assertNotNull(p);
23-
23+
2424
assertEquals(input.toUri(), p.toUri());
25-
assertEquals(input, p);
25+
assertEquals(input.toAbsolutePath(), p.toAbsolutePath());
2626
}
2727

2828
// [databind#1688]:
@@ -41,6 +41,6 @@ public void testPolymorphicPath() throws Exception
4141
Object ob = obs[0];
4242
assertTrue(ob instanceof Path);
4343

44-
assertEquals(input.toString(), ob.toString());
44+
assertEquals(input.toAbsolutePath().toString(), ob.toString());
4545
}
4646
}

0 commit comments

Comments
 (0)