We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7790122 commit 2a22a0cCopy full SHA for 2a22a0c
graphviz-java/src/main/java/guru/nidi/graphviz/engine/IoUtils.java
@@ -33,11 +33,7 @@ static String readStream(InputStream in) throws IOException {
33
}
34
35
static boolean isOnClasspath(String resource) {
36
- try (final InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource)) {
37
- return stream != null;
38
- } catch (IOException e) {
39
- throw new AssertionError(e);
40
- }
+ return Thread.currentThread().getContextClassLoader().getResource(resource) != null;
41
42
43
static void closeQuietly(AutoCloseable c) {
0 commit comments