Dan Smith created GEODE-1742: -------------------------------- Summary: Possible NPE from CqAttributesFactory.getCQListeners Key: GEODE-1742 URL: https://issues.apache.org/jira/browse/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 {code} public CqListener[] getCqListeners() { if (this.cqListeners == null){ return CqAttributesImpl.EMPTY_LISTENERS; } CqListener[] result = null; synchronized(this.clSync){ //Here, cqListeners may have been set to null by another method result = new CqListener[cqListeners.size()]; cqListeners.toArray(result); } return result; } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)