[
https://issues.apache.org/jira/browse/ARTEMIS-383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Styk updated ARTEMIS-383:
--------------------------------
Description:
Static code analysis tool discovered possible issue in class QueueImpl.
Following is affected part of code, starting on line number 2461 in method
{code:java}
public void postAcknowledge(final MessageReference ref)
{code}
{code:java}
boolean durableRef = message != null && message.isDurable() &&
queue.durable; \\line 2461
try {
message.decrementRefCount();
\\line 2464
}
catch (Exception e) {
ActiveMQServerLogger.LOGGER.errorDecrementingRefCount(e);
}
{code}
Line 2461 contains check for null message. That implies that message might be
null. In following try block, line 2464 message contains method call on this
message object.
was:
Static code analysis tool discovered possible issue in class QueueImpl.
Following is affected part of code, starting on line number 2461 in method
public void postAcknowledge(final MessageReference ref) {code:java}
{code:java}
boolean durableRef = message != null && message.isDurable() &&
queue.durable; \\line 2461
try {
message.decrementRefCount();
\\line 2464
}
catch (Exception e) {
ActiveMQServerLogger.LOGGER.errorDecrementingRefCount(e);
}
Line 2461 contains check for null message. That implies that message might be
null. In following try block, line 2464 message contains method call on this
message object.
> Possible method call on null object in QueueImpl class
> ------------------------------------------------------
>
> Key: ARTEMIS-383
> URL: https://issues.apache.org/jira/browse/ARTEMIS-383
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Martin Styk
> Priority: Minor
>
> Static code analysis tool discovered possible issue in class QueueImpl.
> Following is affected part of code, starting on line number 2461 in method
> {code:java}
> public void postAcknowledge(final MessageReference ref)
> {code}
>
> {code:java}
> boolean durableRef = message != null && message.isDurable() &&
> queue.durable; \\line 2461
>
> try {
> message.decrementRefCount();
> \\line 2464
> }
> catch (Exception e) {
> ActiveMQServerLogger.LOGGER.errorDecrementingRefCount(e);
> }
> {code}
> Line 2461 contains check for null message. That implies that message might be
> null. In following try block, line 2464 message contains method call on this
> message object.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)