-
Bug
-
Resolution: Fixed
-
Minor
-
8.5.0
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.5.2 S2
-
None
getValue is causing a NPE on numOfKids = _numOfKids.removeFirst(); because _numOfKids is null.
public Object getValue(ELContext ctx, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (ctx == null) { throw new NullPointerException(); } Integer numOfKids; Path path; if (base == null) { //init numOfKids = (Integer) ctx.getContext(AstIdentifier.class); //Number of siblings of AstIdentifier path = new Path(); } else { *numOfKids = _numOfKids.removeFirst();* path = _paths.removeFirst(); }
I have a zul page that calls a custom function defined in a tld file.
<listcell sclass="h20" label="@load(c:getMatchCompetitors(ma).date)"></listcell>
If i see the stack trace, the return value is correct. and also the properties are correct (i have a date property)
The NPE is caused whe trying to remove an element from an empty list. A test on empty should be executed before removing it
A similar test is present in getType method