Jetty9 - Fixed handling of <Configure> when it contains only <Arg> elements.

This commit is contained in:
Simone Bordet 2012-08-10 19:37:45 +02:00
parent fc7001ec8c
commit b5f7e054be
1 changed files with 5 additions and 7 deletions

View File

@ -341,7 +341,7 @@ public class XmlConfiguration
String id = _config.getAttribute("id");
Object obj = id == null ? null : _idMap.get(id);
int index = 0;
int index = _config.size();
if (obj == null && oClass != null)
{
List<Object> arguments = new ArrayList<>();
@ -370,7 +370,7 @@ public class XmlConfiguration
throw new IllegalStateException("No suitable constructor on " + oClass, x);
}
}
configure(obj, _config, index);
return obj;
}
@ -437,8 +437,6 @@ public class XmlConfiguration
case "Property":
propertyObj(node);
break;
case "Arg": // Arg should have been processed for Configure already so ignore it here
break;
default:
throw new IllegalStateException("Unknown tag: " + tag + " in " + _url);
}
@ -759,9 +757,9 @@ public class XmlConfiguration
/*
* Create a new value object.
*
* @param obj
* @param node
*
* @param obj
* @param node
*
* @return @exception Exception
*/
private Object newObj(Object obj, XmlParser.Node node) throws Exception