Source:
private static void parseLoggerElement(final XMLExtendedStreamReader reader, final PathAddress address, final List<ModelNode> operations, final Set<String> names) throws XMLStreamException { final ModelNode operation = Util.createAddOperation(); String name = null; final EnumSet<Attribute> required = EnumSet.of(Attribute.CATEGORY); final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { requireNoNamespaceAttribute(reader, i); final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); required.remove(attribute); switch (attribute) { case CATEGORY: { if("".equals(value)) { throw invalidAttributeValue(reader, i); } name = value; break; } case USE_PARENT_HANDLERS: { USE_PARENT_HANDLERS.parseAndSetParameter(value, operation, reader); break; } default: throw unexpectedAttribute(reader, i); } } if (!required.isEmpty()) { throw missingRequired(reader, required); } assert name != null; if (!names.add(name)) { throw duplicateNamedElement(reader, name); } addOperationAddress(operation, address, LOGGER, name); final EnumSet<Element> encountered = EnumSet.noneOf(Element.class); while (reader.hasNext() && reader.nextTag() != END_ELEMENT) { final Element element = Element.forName(reader.getLocalName()); if (!encountered.add(element)) { throw duplicateNamedElement(reader, reader.getLocalName()); } switch (element) { case LEVEL: { LEVEL.parseAndSetParameter(readNameAttribute(reader), operation, reader); break; } case HANDLERS: { parseHandlersElement(operation.get(HANDLERS.getName()), reader); break; } case FILTER_SPEC: { FILTER_SPEC.parseAndSetParameter(readValueAttribute(reader), operation, reader); break; } default: throw unexpectedElement(reader); } } operations.add(operation); }

Target:
private static void parseLoggerElement(final XMLExtendedStreamReader reader, final PathAddress address, final List<ModelNode> operations, final Set<String> names) throws XMLStreamException { final ModelNode operation = Util.createAddOperation(); String name = null; final EnumSet<Attribute> required = EnumSet.of(Attribute.CATEGORY); final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { requireNoNamespaceAttribute(reader, i); final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); required.remove(attribute); switch (attribute) { case CATEGORY: { if (value == null || value.trim().isEmpty()) { throw invalidAttributeValue(reader, i); } name = value; break; } case USE_PARENT_HANDLERS: { USE_PARENT_HANDLERS.parseAndSetParameter(value, operation, reader); break; } default: throw unexpectedAttribute(reader, i); } } if (!required.isEmpty()) { throw missingRequired(reader, required); } assert name != null; if (!names.add(name)) { throw duplicateNamedElement(reader, name); } addOperationAddress(operation, address, LOGGER, name); final EnumSet<Element> encountered = EnumSet.noneOf(Element.class); while (reader.hasNext() && reader.nextTag() != END_ELEMENT) { final Element element = Element.forName(reader.getLocalName()); if (!encountered.add(element)) { throw duplicateNamedElement(reader, reader.getLocalName()); } switch (element) { case LEVEL: { LEVEL.parseAndSetParameter(readNameAttribute(reader), operation, reader); break; } case HANDLERS: { parseHandlersElement(operation.get(HANDLERS.getName()), reader); break; } case FILTER_SPEC: { FILTER_SPEC.parseAndSetParameter(readValueAttribute(reader), operation, reader); break; } default: throw unexpectedElement(reader); } } operations.add(operation); }