Skip to content

Commit

Permalink
[cleanup] Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
aheritier committed Oct 10, 2019
1 parent 9990442 commit 83a87e2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ protected AdvisorGlobalConfiguration instance(Mapping mapping, ConfigurationCont
// Scalar values
final String email = (mapping.get("email") != null ? mapping.getScalarValue("email") : StringUtils.EMPTY);
final String cc = (mapping.get("cc") != null ? mapping.getScalarValue("cc") : StringUtils.EMPTY);
final boolean nagDisabled = (mapping.get("nagDisabled") != null ? BooleanUtils.toBoolean(mapping.getScalarValue("nagDisabled")) : false);
final boolean acceptToS = (mapping.get("acceptToS") != null ? BooleanUtils.toBoolean(mapping.getScalarValue("acceptToS")) : false);
final boolean nagDisabled = (mapping.get("nagDisabled") != null &&
BooleanUtils.toBoolean(mapping.getScalarValue("nagDisabled")));
final boolean acceptToS = (mapping.get("acceptToS") != null &&
BooleanUtils.toBoolean(mapping.getScalarValue("acceptToS")));

// List values
final Set<String> excludedComponents = new HashSet<>();
Expand Down

0 comments on commit 83a87e2

Please sign in to comment.