[ https://issues.apache.org/jira/browse/GEODE-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Swapnil Bawaskar closed GEODE-1742. ----------------------------------- > 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 > Assignee: Dan Smith > Fix For: 1.0.0-incubating > > > 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)