You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.adoc
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ As a result, the following GraphQL mutations have been removed `exposeRequiremen
16
16
- https://github.com/eclipse-syson/syson/issues/2045[#2045] [diagrams] The service `ViewNodeService#revealCompartment` has been changed to reveal a compartment only when it is needed.
17
17
+ Only reveal a compartment of a node when none of the revealed compartment can display the `targetElement`.
18
18
+ If many compartment candidates exist, choose the first free form compartment.
19
+
- https://github.com/eclipse-syson/syson/issues/2143[#2143] [configuration] The `relativePathToDirectoryContainingLibraryFiles` field in `SysONLibraryLoadingDefinition` now expects a `String` instead of a `java.nio.file.Path`.
20
+
+ This change ensures compatibility with classpath resource resolution, which requires forward slashes (`/`) as path separators.
19
21
20
22
=== Dependency update
21
23
@@ -35,6 +37,7 @@ As a result, the following GraphQL mutations have been removed `exposeRequiremen
35
37
36
38
- https://github.com/eclipse-syson/syson/issues/2045[#2045] [diagrams] In Interconnection View diagrams, fix an issue where the `parts` compartment of a `PartDefinition` graphical node was incorrectly revealed when creating a `PartUsage` from the `PartDefinition` graphical node, even if the `interconnection` compartment was already visible.
37
39
- https://github.com/eclipse-syson/syson/issues/2094[#2094] [libraries] Ensure library documents are read-only.
40
+
- https://github.com/eclipse-syson/syson/issues/2143[#2143] [configuration] Fixed classpath resource resolution on Windows by enforcing forward slashes (`/`) in library paths.
Copy file name to clipboardExpand all lines: backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/configuration/SysONDefaultLibrariesConfiguration.java
Copy file name to clipboardExpand all lines: backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/libraries/SysONLibraryLoader.java
@@ -141,7 +141,7 @@ public List<ClassPathResource> findAllLibraryResourcesFromApplicationClasspath(f
141
141
LOGGER.error("There was an unexpected issue while attempting to retrieve %s resources at location: %s".formatted(definition.familyName(), locationPattern), ioException);
Copy file name to clipboardExpand all lines: backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/libraries/SysONLibraryLoadingDefinition.java
@@ -61,11 +60,15 @@ public record SysONLibraryLoadingDefinition(
61
60
Objects.requireNonNull(fileExtensions);
62
61
Objects.requireNonNull(resourceLoadingBehavior);
63
62
64
-
if (relativePathToDirectoryContainingLibraryFiles.isAbsolute()) {
65
-
thrownewIllegalArgumentException("Path '%s' is absolute, but a relative one was expected.".formatted(relativePathToDirectoryContainingLibraryFiles.toString()));
63
+
if (relativePathToDirectoryContainingLibraryFiles.startsWith("/")) {
64
+
thrownewIllegalArgumentException("Path '%s' is absolute, but a relative one was expected.".formatted(relativePathToDirectoryContainingLibraryFiles));
66
65
}
67
-
if (relativePathToDirectoryContainingLibraryFiles.toFile().exists() && !relativePathToDirectoryContainingLibraryFiles.toFile().isDirectory()) {
68
-
thrownewIllegalArgumentException("Path '%s' exists but is not a directory.".formatted(relativePathToDirectoryContainingLibraryFiles.toString()));
66
+
67
+
// Validate that the path does not contain Windows-style separators
68
+
if (relativePathToDirectoryContainingLibraryFiles.contains("\\")) {
69
+
thrownewIllegalArgumentException(
70
+
"Path '%s' contains Windows-style separators ('\\'). Only forward slashes ('/') are allowed for classpath resources.".formatted(relativePathToDirectoryContainingLibraryFiles)
0 commit comments