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:
mh2753 2017-12-04 19:59:30 +01:00 committed by Gian Merlino
parent aacc57131b
commit c3bb03dcec
1 changed files with 3 additions and 5 deletions

View File

@ -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()