Skip to content

Commit cc994bb

Browse files
fix checkstyle
1 parent 32aa110 commit cc994bb

File tree

2 files changed

+12
-1
lines changed
  • core/esmf-aspect-meta-model-java/src

2 files changed

+12
-1
lines changed

core/esmf-aspect-meta-model-java/src/main/java/org/eclipse/esmf/aspectmodel/resolver/fs/ModelsRoot.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ public Stream<Path> paths() {
5151

5252
public abstract Path directoryForNamespace( final AspectModelUrn urn );
5353

54+
/**
55+
* Determines the aspect model file for the given {@link AspectModelUrn}.
56+
*
57+
* <p>Constructs the file path by resolving the namespace directory.
58+
* Validates the file using its canonical path.
59+
*
60+
* <p>Returns an empty file if the resolution fails.
61+
*
62+
* @param urn the {@link AspectModelUrn} representing the aspect model.
63+
* @return the resolved {@link File}, or an empty file if resolution fails.
64+
*/
5465
public File determineAspectModelFile( final AspectModelUrn urn ) {
5566
Path path = directoryForNamespace( urn ).resolve( urn.getName() + ".ttl" );
5667
return resolveByCanonicalPath( path );

core/esmf-aspect-meta-model-java/src/test/java/org/eclipse/esmf/aspectmodel/resolver/fs/ModelsRootTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void resolveByCanonicalPathShouldReturnEmptyFileWhenCanonicalPathDoesNotMatch()
5858
}
5959

6060
@Test
61-
void resolveByCanonicalPathShouldReturnEmptyFileWhenIOExceptionOccurs() throws Exception {
61+
void resolveByCanonicalPathShouldReturnEmptyFileWhenIoExceptionOccurs() throws Exception {
6262
Path pathCausingIOException = Paths.get( "pathCausingIOException" );
6363

6464
File result = invokeResolveByCanonicalPath( pathCausingIOException );

0 commit comments

Comments
 (0)