jbertram commented on code in PR #5303:
URL: https://github.com/apache/activemq-artemis/pull/5303#discussion_r1813230901


##########
artemis-log-annotation-processor/src/main/java/org/apache/activemq/artemis/logs/annotation/processor/LogAnnotationProcessor.java:
##########
@@ -204,6 +208,17 @@ void validateRegexID(LogBundle bundleAnnotation, long id) {
       }
    }
 
+   void checkRetiredIDs(LogBundle bundleAnnotation, long id) {
+      if (bundleAnnotation.retiredIDs() != null && 
!bundleAnnotation.retiredIDs().isEmpty()) {
+         if (Arrays.stream(bundleAnnotation.retiredIDs().split(","))
+                   .map(String::trim)
+                   .map(Long::valueOf)
+                   .collect(Collectors.toList()).contains(id)) {
+            throw new IllegalArgumentException("Code ID " + id + " has been 
retired. Select a different ID.");
+         }
+      }
+   }

Review Comment:
   I've updated the code to suggest a valid ID when an invalid one is found.



-- 
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: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to