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


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java:
##########
@@ -658,6 +658,8 @@ public QueueImpl(final QueueConfiguration 
queueConfiguration,
                     final QueueFactory factory) {
       super(server == null ? EmptyCriticalAnalyzer.getInstance() : 
server.getCriticalAnalyzer(), CRITICAL_PATHS);
 
+      Objects.requireNonNull(server);

Review Comment:
   Agreed. Since Java < 22 forces `super` to be the first call it makes this 
kind of clumsy. Maybe I should just do:
   ```java
   super(server.getCriticalAnalyzer(), CRITICAL_PATHS);
   ```
   And if `server` is `null` then it will throw an NPE instead of 
`requireNonNull`.



-- 
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