Skip to content

Commit a175904

Browse files
committed
Check provided toolsJar file exists
1 parent 6228805 commit a175904

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/kotlin/com/tschuchort/compiletesting/KotlinCompilation.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ class KotlinCompilation {
460460
"toolsJar must not be null on JDK 8 or earlier if it's classes aren't already on the classpath"
461461
}
462462

463+
require(toolsJar!!.exists()) { "toolsJar file does not exist" }
463464
(ClassLoader.getSystemClassLoader() as URLClassLoader).addUrl(toolsJar!!.toURI().toURL())
464465
}
465466
}

0 commit comments

Comments
 (0)