Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3811

PathELResolver.getValue cause a NPE


    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 8.5.0
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Jimmy
    • Labels:


      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


        There are no comments yet on this issue.


          • Assignee:
            DevChu DevChu
            afxgroup afxgroup
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created: