File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
core/esmf-aspect-meta-model-java/src
main/java/org/eclipse/esmf/aspectmodel/resolver/fs
test/java/org/eclipse/esmf/aspectmodel/resolver/fs Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public File determineAspectModelFile( final AspectModelUrn urn ) {
59
59
private static File resolveByCanonicalPath ( final Path path ) {
60
60
File file = path .toFile ();
61
61
try {
62
- if ( Objects .equals ( path .toString (), file .getCanonicalPath () ) ) {
62
+ if ( Objects .equals ( path .normalize (). toString (), file .getCanonicalPath () ) ) {
63
63
return file ;
64
64
}
65
65
} catch ( IOException exception ) {
Original file line number Diff line number Diff line change @@ -19,7 +19,20 @@ void resolveByCanonicalPathShouldReturnFileWhenCanonicalPathMatches() throws Exc
19
19
20
20
File result = invokeResolveByCanonicalPath ( testPath );
21
21
22
- assertThat ( result ).isEqualTo ( testPath .toFile () );
22
+ assertThat ( result )
23
+ .matches ( File ::exists )
24
+ .isEqualTo ( testPath .toFile () );
25
+ }
26
+
27
+ @ Test
28
+ void resolveByCanonicalPathShouldReturnFileWhenCanonicalPathMatchesForSpecificPath () throws Exception {
29
+ Path testPath = Paths .get ( "src/test/resources/resolve_empty/../resolve" , "Aspect.ttl" ).toAbsolutePath ();
30
+
31
+ File result = invokeResolveByCanonicalPath ( testPath );
32
+
33
+ assertThat ( result )
34
+ .matches ( File ::exists )
35
+ .isEqualTo ( testPath .toFile () );
23
36
}
24
37
25
38
@ Test
You can’t perform that action at this time.
0 commit comments