You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@twill.apache.org by "Henry Saputra (JIRA)" <ji...@apache.org> on 2015/06/18 00:04:00 UTC
[jira] [Updated] (TWILL-136) Override equals and hashCode for
JvmOptions.DebugOptions to test equality
[ https://issues.apache.org/jira/browse/TWILL-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henry Saputra updated TWILL-136:
--------------------------------
Description:
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:
{code}
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;
}
....
if ((extraOptions == null || extraOptions.isEmpty()) &&
JvmOptions.DebugOptions.NO_DEBUG.equals(debugOptions)) {
// If no vm options, no need to localize the file.
return;
}
...
}
{code}
was:
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:
{code:java}
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;
}
....
if ((extraOptions == null || extraOptions.isEmpty()) &&
JvmOptions.DebugOptions.NO_DEBUG.equals(debugOptions)) {
// If no vm options, no need to localize the file.
return;
}
...
}
{code:java}
> Override equals and hashCode for JvmOptions.DebugOptions to test equality
> -------------------------------------------------------------------------
>
> Key: TWILL-136
> URL: https://issues.apache.org/jira/browse/TWILL-136
> Project: Apache Twill
> Issue Type: Bug
> Components: core
> Reporter: Henry Saputra
>
> 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:
> {code}
> 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;
> }
> ....
> if ((extraOptions == null || extraOptions.isEmpty()) &&
> JvmOptions.DebugOptions.NO_DEBUG.equals(debugOptions)) {
> // If no vm options, no need to localize the file.
> return;
> }
> ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)