geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Smith (JIRA)" <>
Subject [jira] [Created] (GEODE-1742) Possible NPE from CqAttributesFactory.getCQListeners
Date Wed, 10 Aug 2016 17:31:20 GMT
Dan Smith created GEODE-1742:

             Summary: Possible NPE from CqAttributesFactory.getCQListeners 
                 Key: GEODE-1742
             Project: Geode
          Issue Type: Bug
          Components: client queues
            Reporter: Dan Smith

This method checks to see if cqListeners is null outside of synchronization. Other methods
can set cqListeners to be null after this check but before cqListeners is used, resulting
in an NPE

    public CqListener[] getCqListeners() {
      if (this.cqListeners == null){
        return CqAttributesImpl.EMPTY_LISTENERS;
      CqListener[] result = null;
//Here, cqListeners may have been set to null by another method
        result = new CqListener[cqListeners.size()];
      return result;


This message was sent by Atlassian JIRA

View raw message