clebertsuconic commented on code in PR #4015:
URL: https://github.com/apache/activemq-artemis/pull/4015#discussion_r845082777


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java:
##########
@@ -667,13 +724,14 @@ public Page depage() throws Exception {
             return null;
          } else {
             numberOfPages--;
-
+            assert numberOfPages >= 0 : "numberOfPages should never be 
negative. on depage(). currentPageId=" + currentPageId + ", firstPageId=" + 
firstPageId + "";

Review Comment:
   my own review here...
   since I'm returning the counter in case the file did not exist... this could 
be eventually negative, but it would compensate on the ++ for !exists later on..
   
   
   I need to move this assertion for after that check



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to