mirror of https://github.com/apache/druid.git
Make enabled final in JavaScriptConfig (#5130)
* Make enabled final in JavaScriptConfig as it is used in equals and hashCode * Removing the cryptic boolean condition Replacing the cryptic boolean condition with a simple assignment. Changing the param value to boolean from Boolean.
This commit is contained in:
parent
aacc57131b
commit
c3bb03dcec
|
@ -35,16 +35,14 @@ public class JavaScriptConfig
|
|||
private static final JavaScriptConfig ENABLED_INSTANCE = new JavaScriptConfig(true);
|
||||
|
||||
@JsonProperty
|
||||
private boolean enabled = false;
|
||||
private final boolean enabled;
|
||||
|
||||
@JsonCreator
|
||||
public JavaScriptConfig(
|
||||
@JsonProperty("enabled") Boolean enabled
|
||||
@JsonProperty("enabled") boolean enabled
|
||||
)
|
||||
{
|
||||
if (enabled != null) {
|
||||
this.enabled = enabled.booleanValue();
|
||||
}
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public boolean isEnabled()
|
||||
|
|
Loading…
Reference in New Issue