-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix spotbug findings #68
Changes from 6 commits
1e831fc
479b6b2
04756e6
dd80a40
05871b1
b07bbd2
f92317a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import hudson.Extension | |
import hudson.model.AbstractDescribableImpl | ||
import hudson.model.Descriptor | ||
import hudson.util.FormValidation | ||
import org.apache.tools.ant.taskdefs.Exec | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably unused |
||
import org.kohsuke.stapler.DataBoundConstructor | ||
import org.kohsuke.stapler.DataBoundSetter | ||
import org.kohsuke.stapler.QueryParameter | ||
|
@@ -32,6 +33,12 @@ class ExecutionConfig extends AbstractDescribableImpl<ExecutionConfig> implement | |
this.stopUndefinedTools = true | ||
} | ||
|
||
ExecutionConfig(ExecutionConfig config) { | ||
this.timeout = config.getTimeout() | ||
this.stopOnError = config.isStopOnError() | ||
this.stopUndefinedTools = config.getStopUndefinedTools() | ||
} | ||
|
||
int getTimeout() { | ||
return timeout | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,11 @@ class Constant extends AbstractDescribableImpl<Constant> implements ExpandableCo | |
this.value = StringUtils.trimToEmpty(value) | ||
} | ||
|
||
Constant(Constant constant) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't we use the props and instantiate a new object instead of adding a new constructor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We agreed on using copy constructors :) |
||
this.label = constant.getLabel() | ||
this.value = constant.getValue() | ||
} | ||
|
||
String getLabel() { | ||
return label | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format ->
return executionConfig ? new ExecutionConfig(executionConfig) : null
and L51