Github user jdanekrh commented on the pull request: https://github.com/apache/activemq-artemis/commit/dc41f3ca491e96e199290a225fdaa07ac05d66df#commitcomment-27434879 Finally, there are the three following warnings, which are not directly related to any of the changed lines > Hi, > > Please find the latest report on new defect(s) introduced to ApacheActiveMQArtemis found with Coverity Scan. > > 11 new defect(s) introduced to ApacheActiveMQArtemis found with Coverity Scan. > 4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. ``` ________________________________________________________________________________________________________ *** CID 1465016: Null pointer dereferences (FORWARD_NULL) /activemq-artemis/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java: 1775 in org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.loadPreparedTransactions(org.apache.activemq.artemis.core.postoffice.PostOffice, org.apache.activemq.artemis.core.paging.PagingManager, org.apache.activemq.artemis.core.transaction.ResourceManager, java.util.Map, java.util.List, java.util.Map, java.util.Map, java.util.Set, org.apache.activemq.artemis.core.server.impl.JournalLoader)() 1769 encoding.position.setRecordID(record.id); 1770 1771 PageSubscription sub = locateSubscription(encoding.queueID, pageSubscriptions, queueInfos, pagingManager); 1772 1773 if (sub != null) { 1774 sub.reloadPreparedACK(tx, encoding.position); >>> CID 1465016: Null pointer dereferences (FORWARD_NULL) >>> Passing "null" to "PagedReferenceImpl", which dereferences it. 1775 referencesToAck.add(new PagedReferenceImpl(encoding.position, null, sub)); 1776 } else { 1777 ActiveMQServerLogger.LOGGER.journalCannotFindQueueReloadingACK(encoding.queueID); 1778 } 1779 break; 1780 } ``` To view the defects in Coverity Scan, visit https://scan.coverity.com/projects/apacheactivemqartemis ``` ________________________________________________________________________________________________________ *** CID 1465014: Null pointer dereferences (REVERSE_INULL) /activemq-artemis/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java: 2795 in org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(org.apache.activemq.artemis.core.server.impl.AddressInfo, org.apache.activemq.artemis.api.core.SimpleString, org.apache.activemq.artemis.api.core.SimpleString, org.apache.activemq.artemis.api.core.SimpleString, boolean, boolean, boolean, boolean, boolean, int, boolean, boolean, boolean, boolean)() 2789 } catch (Throwable ignored) { 2790 logger.debug(ignored.getMessage(), ignored); 2791 } 2792 throw e; 2793 } 2794 >>> CID 1465014: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "addrInfo" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 2795 if (addrInfo == null || !addrInfo.isInternal()) { 2796 managementService.registerQueue(queue, queue.getAddress(), storageManager); 2797 } 2798 2799 callBrokerPlugins(hasBrokerPlugins() ? plugin -> plugin.afterCreateQueue(queue) : null); 2800 ``` To view the defects in Coverity Scan, visit https://scan.coverity.com/projects/apacheactivemqartemis ``` ________________________________________________________________________________________________________ *** CID 1465012: Null pointer dereferences (NULL_RETURNS) /activemq-artemis/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java: 366 in org.apache.activemq.artemis.core.paging.cursor.impl.PageSubscriptionImpl.getReference(org.apache.activemq.artemis.core.paging.cursor.PagePosition)() 360 @Override 361 public String toString() { 362 return "PageSubscriptionImpl [cursorId=" + cursorId + ", queue=" + queue + ", filter = " + filter + "]"; 363 } 364 365 private PagedReference getReference(PagePosition pos) { >>> CID 1465012: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be null "cursorProvider.getMessage(pos)" when calling "newReference". (The virtual call resolves to "org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImpl.newReference".) 366 return cursorProvider.newReference(pos, cursorProvider.getMessage(pos), this); 367 } 368 369 @Override 370 public PageIterator iterator() { 371 return new CursorIterator(); ``` To view the defects in Coverity Scan, visit https://scan.coverity.com/projects/apacheactivemqartemis
---