apache /
twill /
feee57aeb403d2d3fa7f0c5ee327c8a6c63284d6 TWILL-136 Override equals and hashCode for JvmOptions.DebugOptions to test equality
The current code for JvmOptions.DebugOptions does not have equals and hashCode overriden for equality test.
This would cause fail comparison for DebugOptions.NO_DEBUG when being used in YarnTwillPreparer:
final class YarnTwillPreparer implements TwillPreparer {
...
@Override
public TwillPreparer enableDebugging(boolean doSuspend, String... runnables) {
this.debugOptions = new JvmOptions.DebugOptions(true, doSuspend, ImmutableSet.copyOf(runnables));
return this;
}
....
private void saveJvmOptions(Map<String, LocalFile> localFiles) throws IOException {
if ((extraOptions == null || extraOptions.isEmpty()) &&
JvmOptions.DebugOptions.NO_DEBUG.equals(this.debugOptions)) {
// If no vm options, no need to localize the file.
return;
}
...
}
...
}
This closes #43 on GitHub
Signed-off-by: Terence Yim <chtyim@apache.org>
2 files changed