Skip to content

Commit

Permalink
Merge pull request #43 from MRamonLeon/JENKINS-53394
Browse files Browse the repository at this point in the history
[JENKINS-53394] Check null options
  • Loading branch information
kohsuke authored Oct 30, 2018
2 parents fbc510d + d9b9a6c commit b5910eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/file_leak_detector/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void run() throws Exception {
System.out.println("Activating file leak detector at "+agentJar);
// load a specified agent onto the JVM
// pass the hidden option to prevent this from killing the target JVM if the options were wrong
api.getMethod("loadAgent",String.class,String.class).invoke(vm, agentJar.getPath(), "noexit,"+options);
api.getMethod("loadAgent",String.class,String.class).invoke(vm, agentJar.getPath(), options == null ? "noexit" : "noexit,"+options);
} finally {
api.getMethod("detach").invoke(vm);
}
Expand Down

0 comments on commit b5910eb

Please sign in to comment.