Skip to content

Commit 016eaf7

Browse files
committed
spotbugs fix
1 parent d302b7e commit 016eaf7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

task/src/main/java/pro/javacard/ant/JCCap.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,10 @@ private void compile() {
448448
Path from = srcDir.toPath().resolve(rel);
449449
Path to = mergedDir.resolve(rel);
450450
try {
451-
Files.createDirectories(to.getParent());
451+
Path parent = to.getParent();
452+
if (parent != null) {
453+
Files.createDirectories(parent);
454+
}
452455
Files.copy(from, to, StandardCopyOption.REPLACE_EXISTING);
453456
} catch (IOException e) {
454457
throw new BuildException("Failed to copy source file: " + from, e);

0 commit comments

Comments
 (0)