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