Source:
<code>protected void parseStaticDiscoveryOption(final XMLExtendedStreamReader reader, final ModelNode address, Namespace expectedNs, final List<ModelNode> list, final Set<String> staticDiscoveryOptionNames) throws XMLStreamException { final ModelNode staticDiscoveryOptionAddress = address.clone(); staticDiscoveryOptionAddress.add(CORE_SERVICE, DISCOVERY_OPTIONS); final ModelNode addOp = Util.getEmptyOperation(ADD, new ModelNode()); list.add(addOp); final Set<Attribute> required = EnumSet.of(Attribute.NAME, Attribute.HOST, Attribute.PORT); 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 NAME: { if (!staticDiscoveryOptionNames.add(value)) { throw ParseUtils.duplicateNamedElement(reader, value); } addOp.get(OP_ADDR).set(staticDiscoveryOptionAddress).add(STATIC_DISCOVERY, value); break; } case HOST: { StaticDiscoveryResourceDefinition.HOST.parseAndSetParameter(value, addOp, reader); break; } case PROTOCOL: { <START> if(Namespace.forUri(reader.getNamespaceURI()).getMajorVersion() > 2) { <END> StaticDiscoveryResourceDefinition.PROTOCOL.parseAndSetParameter(value, addOp, reader); } else { throw unexpectedAttribute(reader, i); } break; } case PORT: { StaticDiscoveryResourceDefinition.PORT.parseAndSetParameter(value, addOp, reader); break; } default: throw unexpectedAttribute(reader, i); } } if (required.size() > 0) { throw missingRequired(reader, required); } requireNoContent(reader); }</code><technical_language>expected namespace here, need re-obtain reader</technical_language>

Target:
protected void parseStaticDiscoveryOption(final XMLExtendedStreamReader reader, final ModelNode address, Namespace expectedNs, final List<ModelNode> list, final Set<String> staticDiscoveryOptionNames) throws XMLStreamException { final ModelNode staticDiscoveryOptionAddress = address.clone(); staticDiscoveryOptionAddress.add(CORE_SERVICE, DISCOVERY_OPTIONS); final ModelNode addOp = Util.getEmptyOperation(ADD, new ModelNode()); list.add(addOp); final Set<Attribute> required = EnumSet.of(Attribute.NAME, Attribute.HOST, Attribute.PORT); 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 NAME: { if (!staticDiscoveryOptionNames.add(value)) { throw ParseUtils.duplicateNamedElement(reader, value); } addOp.get(OP_ADDR).set(staticDiscoveryOptionAddress).add(STATIC_DISCOVERY, value); break; } case HOST: { StaticDiscoveryResourceDefinition.HOST.parseAndSetParameter(value, addOp, reader); break; } case PROTOCOL: { if(expectedNs.getMajorVersion() > 2) { StaticDiscoveryResourceDefinition.PROTOCOL.parseAndSetParameter(value, addOp, reader); } else { throw unexpectedAttribute(reader, i); } break; } case PORT: { StaticDiscoveryResourceDefinition.PORT.parseAndSetParameter(value, addOp, reader); break; } default: throw unexpectedAttribute(reader, i); } } if (required.size() > 0) { throw missingRequired(reader, required); } requireNoContent(reader); }