diff --git a/auth/client/src/main/java/org/wildfly/security/auth/client/ElytronXmlParser.java b/auth/client/src/main/java/org/wildfly/security/auth/client/ElytronXmlParser.java index 0a9702d1c87..334a058e9f0 100644 --- a/auth/client/src/main/java/org/wildfly/security/auth/client/ElytronXmlParser.java +++ b/auth/client/src/main/java/org/wildfly/security/auth/client/ElytronXmlParser.java @@ -1084,12 +1084,10 @@ static ExceptionSupplier, 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 () -> {