Skip to content

Commit

Permalink
Merge pull request #2015 from PrarthonaPaul/ELY-2594_ImproveReadability
Browse files Browse the repository at this point in the history
ELY-2594 Changed switch to if-else to increase readability for Elytro…
  • Loading branch information
darranl authored Mar 8, 2024
2 parents d0debf7 + 9a42806 commit 6907d9c
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1081,12 +1081,10 @@ static <C> ExceptionSupplier<RuleNode<C>, ConfigXMLParseException> parseRulesTyp
final int tag = reader.nextTag();
if (tag == START_ELEMENT) {
checkElementNamespace(reader, xmlVersion);
switch (reader.getLocalName()) {
case "rule": {
rulesList.add(ruleParseFunction.apply(reader, configurations));
break;
}
default: throw reader.unexpectedElement();
if (reader.getLocalName().equals("rule")) {
rulesList.add(ruleParseFunction.apply(reader, configurations));
} else {
throw reader.unexpectedElement();
}
} else if (tag == END_ELEMENT) {
return () -> {
Expand Down

0 comments on commit 6907d9c

Please sign in to comment.