[
https://issues.jboss.org/browse/AS7-3758?page=com.atlassian.jira.plugin.s...
]
Scott Stark edited comment on AS7-3758 at 2/15/12 11:19 AM:
------------------------------------------------------------
Right, the source of the difference is in parseSimpleInterfaceCriterion where the
INET_ADDRESS case is calling out to parsePossibleExpression while the LOOPBACK_ADDRESS
case is not.
{code:title=parseSimpleInterfaceCriterion}
protected void parseSimpleInterfaceCriterion(final XMLExtendedStreamReader reader,
final ModelNode subModel, boolean nested)
throws XMLStreamException {
final Element element = Element.forName(reader.getLocalName());
final String localName = element.getLocalName();
switch (element) {
case INET_ADDRESS: {
requireSingleAttribute(reader, Attribute.VALUE.getLocalName());
final String value = reader.getAttributeValue(0);
ModelNode valueNode = parsePossibleExpression(value);
requireNoContent(reader);
// todo: validate IP address
if(nested) {
subModel.get(localName).add(valueNode);
} else {
subModel.get(localName).set(valueNode);
}
break;
}
case LOOPBACK_ADDRESS: {
requireSingleAttribute(reader, Attribute.VALUE.getLocalName());
final String value = reader.getAttributeValue(0);
requireNoContent(reader);
// todo: validate IP address
subModel.get(localName).set(value);
break;
}
{code}
was (Author: starksm64):
Right, the source of the difference is in parseSimpleInterfaceCriterion where the
INET_ADDRESS case is calling out to parsePossibleExpression while the LOOPBACK_ADDRESS
case is not.
protected void parseSimpleInterfaceCriterion(final XMLExtendedStreamReader reader,
final ModelNode subModel, boolean nested)
throws XMLStreamException {
final Element element = Element.forName(reader.getLocalName());
final String localName = element.getLocalName();
switch (element) {
case INET_ADDRESS: {
requireSingleAttribute(reader, Attribute.VALUE.getLocalName());
final String value = reader.getAttributeValue(0);
ModelNode valueNode = parsePossibleExpression(value);
requireNoContent(reader);
// todo: validate IP address
if(nested) {
subModel.get(localName).add(valueNode);
} else {
subModel.get(localName).set(valueNode);
}
break;
}
case LOOPBACK_ADDRESS: {
requireSingleAttribute(reader, Attribute.VALUE.getLocalName());
final String value = reader.getAttributeValue(0);
requireNoContent(reader);
// todo: validate IP address
subModel.get(localName).set(value);
break;
}
ParsedInterfaceCriteria.parseCriteria is not maintaining
ExpressionValues
-------------------------------------------------------------------------
Key: AS7-3758
URL:
https://issues.jboss.org/browse/AS7-3758
Project: Application Server 7
Issue Type: Bug
Components: Domain Management
Affects Versions: 7.1.0.CR1b
Reporter: Scott Stark
Assignee: Scott Stark
Labels: network
Original Estimate: 1 hour
Remaining Estimate: 1 hour
The parsing of interfaces is throwing away ExpressionValues that are created from
parsePossibleExpression since the resulting ExpressionValue is not passed onto the
For example, in this LOOPBACK_ADDRESS block, the input property.getValue() is passed to
the LoopbackAddressInterfaceCriteria ctor rather than the ExpressionValue that is created
by parsePossibleExpression:
case LOOPBACK_ADDRESS: {
ModelNode value = property.getValue();
value = parsePossibleExpression(value);
checkStringType(value, element.getLocalName(), true);
return new LoopbackAddressInterfaceCriteria(property.getValue());
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira