Source:
<code>private void parseEviction(XMLExtendedStreamReader reader, ModelNode cache, Map<PathAddress, ModelNode> operations) throws XMLStreamException { if (namespace.since(9, 0)) { throw ParseUtils.unexpectedElement(reader); } boolean enabled = false; long size = -1; String type = null; for (int i = 0; i < reader.getAttributeCount(); i++) { String value = reader.getAttributeValue(i); Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case STRATEGY: { try { enabled = EvictionStrategy.valueOf(value).isEnabled(); } catch (IllegalArgumentException e) { enabled = true; } break; } <START> case MAX_ENTRIES: { <END> if (namespace.since(8, 1)) { throw ParseUtils.unexpectedAttribute(reader, i); } } case SIZE: { size = Long.valueOf(value); break; } case TYPE: { type = value; break; } default: { throw ParseUtils.unexpectedAttribute(reader, i); } } } if (enabled && size > 0) { PathElement path; SimpleAttributeDefinition sizeAtt; if (type == null || type.equals(EvictionType.COUNT.toString())) { path = MemoryObjectConfigurationResource.PATH; sizeAtt = MemoryObjectConfigurationResource.SIZE; } else { path = MemoryBinaryConfigurationResource.PATH; sizeAtt = MemoryBinaryConfigurationResource.SIZE; } PathAddress memoryAddress = PathAddress.pathAddress(cache.get(OP_ADDR)).append(path); ModelNode memory = Util.createAddOperation(memoryAddress); sizeAtt.parseAndSetParameter(String.valueOf(size), memory, reader); if (EvictionType.MEMORY.toString().equals(type)) { MemoryBinaryConfigurationResource.EVICTION.parseAndSetParameter(type, memory, reader); } operations.put(memoryAddress, memory); } ParseUtils.requireNoContent(reader); }</code><technical_language>throw Exception if parser is 11 higher strategy is recognised</technical_language>

Target:
private void parseEviction(XMLExtendedStreamReader reader, ModelNode cache, Map<PathAddress, ModelNode> operations) throws XMLStreamException { if (namespace.since(9, 0)) { throw ParseUtils.unexpectedElement(reader); } boolean enabled = false; long size = -1; String type = null; for (int i = 0; i < reader.getAttributeCount(); i++) { String value = reader.getAttributeValue(i); Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case STRATEGY: { try { enabled = EvictionStrategy.valueOf(value).isEnabled(); } catch (IllegalArgumentException e) { if (namespace.since(11, 0)) { throw e; } enabled = true; } break; } case MAX_ENTRIES: { if (namespace.since(8, 1)) { throw ParseUtils.unexpectedAttribute(reader, i); } } case SIZE: { size = Long.valueOf(value); break; } case TYPE: { type = value; break; } default: { throw ParseUtils.unexpectedAttribute(reader, i); } } } if (enabled && size > 0) { PathElement path; SimpleAttributeDefinition sizeAtt; if (type == null || type.equals(EvictionType.COUNT.toString())) { path = MemoryObjectConfigurationResource.PATH; sizeAtt = MemoryObjectConfigurationResource.SIZE; } else { path = MemoryBinaryConfigurationResource.PATH; sizeAtt = MemoryBinaryConfigurationResource.SIZE; } PathAddress memoryAddress = PathAddress.pathAddress(cache.get(OP_ADDR)).append(path); ModelNode memory = Util.createAddOperation(memoryAddress); sizeAtt.parseAndSetParameter(String.valueOf(size), memory, reader); if (EvictionType.MEMORY.toString().equals(type)) { MemoryBinaryConfigurationResource.EVICTION.parseAndSetParameter(type, memory, reader); } operations.put(memoryAddress, memory); } ParseUtils.requireNoContent(reader); }