Skip to content

Commit

Permalink
Fix in resource loading approach
Browse files Browse the repository at this point in the history
  • Loading branch information
bzafiris committed Sep 30, 2024
1 parent 06a87c1 commit f1eb331
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/util/Resources.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package util;

import com.brunomnsilva.smartgraph.graphview.SmartGraphProperties;
import model.diagram.javafx.JavaFXClassVisualization;

import java.io.InputStream;
import java.net.URI;
Expand All @@ -9,11 +10,11 @@
public class Resources {

public static InputStream loadResourceFile(String relativePath) {
return Thread.currentThread().getContextClassLoader().getResourceAsStream(relativePath);
return Resources.class.getClassLoader().getResourceAsStream(relativePath);
}

public static URI getResourceURI(String relativePath) throws URISyntaxException {
return Thread.currentThread().getContextClassLoader().getResource(relativePath).toURI();
return Resources.class.getClassLoader().getResource(relativePath).toURI();
}

}

0 comments on commit f1eb331

Please sign in to comment.