Source:
private void parseRemoteDomainController_2_0(final XMLExtendedStreamReader reader, final ModelNode address, Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException { boolean requireDiscoveryOptions = false; boolean hasDiscoveryOptions = false; Namespace actualNs = Namespace.forUri(reader.getNamespaceURI()); if (actualNs.getMajorVersion()< 3) { requireDiscoveryOptions = parseRemoteDomainControllerAttributes_2_0(reader, address, list); } else { requireDiscoveryOptions = parseRemoteDomainControllerAttributes_3_0(reader, address, list); } Set<String> types = new HashSet<String>(); Set<String> staticDiscoveryOptionNames = new HashSet<String>(); Set<String> discoveryOptionNames = new HashSet<String>(); while (reader.hasNext() && reader.nextTag() != END_ELEMENT) { requireNamespace(reader, expectedNs); final Element element = Element.forName(reader.getLocalName()); switch (element) { case IGNORED_RESOURCE: { parseIgnoredResource(reader, address, expectedNs, list, types); break; } case DISCOVERY_OPTIONS: { if (hasDiscoveryOptions) { throw ControllerLogger.ROOT_LOGGER.alreadyDefined(element.getLocalName(), reader.getLocation()); } parseDiscoveryOptions(reader, address, expectedNs, list, staticDiscoveryOptionNames, discoveryOptionNames); hasDiscoveryOptions = true; break; } default: throw unexpectedElement(reader); } } if (requireDiscoveryOptions && !hasDiscoveryOptions) { throw ControllerLogger.ROOT_LOGGER.discoveryOptionsMustBeDeclared(CommandLineConstants.ADMIN_ONLY, Attribute.ADMIN_ONLY_POLICY.getLocalName(), AdminOnlyDomainConfigPolicy.FETCH_FROM_MASTER.toString(), Element.DISCOVERY_OPTIONS.getLocalName(), Attribute.HOST.getLocalName(), Attribute.PORT.getLocalName(), reader.getLocation()); } }

Target:
private void parseRemoteDomainController_2_0(final XMLExtendedStreamReader reader, final ModelNode address, Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException { boolean requireDiscoveryOptions = false; boolean hasDiscoveryOptions = false; if (expectedNs.getMajorVersion()< 3) { requireDiscoveryOptions = parseRemoteDomainControllerAttributes_2_0(reader, address, list); } else { requireDiscoveryOptions = parseRemoteDomainControllerAttributes_3_0(reader, address, list); } Set<String> types = new HashSet<String>(); Set<String> staticDiscoveryOptionNames = new HashSet<String>(); Set<String> discoveryOptionNames = new HashSet<String>(); while (reader.hasNext() && reader.nextTag() != END_ELEMENT) { requireNamespace(reader, expectedNs); final Element element = Element.forName(reader.getLocalName()); switch (element) { case IGNORED_RESOURCE: { parseIgnoredResource(reader, address, expectedNs, list, types); break; } case DISCOVERY_OPTIONS: { if (hasDiscoveryOptions) { throw ControllerLogger.ROOT_LOGGER.alreadyDefined(element.getLocalName(), reader.getLocation()); } parseDiscoveryOptions(reader, address, expectedNs, list, staticDiscoveryOptionNames, discoveryOptionNames); hasDiscoveryOptions = true; break; } default: throw unexpectedElement(reader); } } if (requireDiscoveryOptions && !hasDiscoveryOptions) { throw ControllerLogger.ROOT_LOGGER.discoveryOptionsMustBeDeclared(CommandLineConstants.ADMIN_ONLY, Attribute.ADMIN_ONLY_POLICY.getLocalName(), AdminOnlyDomainConfigPolicy.FETCH_FROM_MASTER.toString(), Element.DISCOVERY_OPTIONS.getLocalName(), Attribute.HOST.getLocalName(), Attribute.PORT.getLocalName(), reader.getLocation()); } }