Skip to content

Commit

Permalink
[JENKINS-53394] Check null options
Browse files Browse the repository at this point in the history
  • Loading branch information
MRamonLeon committed Oct 30, 2018
1 parent fbc510d commit d9b9a6c
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 d9b9a6c

Please sign in to comment.