jbertram commented on a change in pull request #3811:
URL: https://github.com/apache/activemq-artemis/pull/3811#discussion_r735869578
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/embedded/EmbeddedActiveMQ.java
##########
@@ -139,7 +139,9 @@ protected void initStart() throws Exception {
}
public EmbeddedActiveMQ stop() throws Exception {
- activeMQServer.stop();
+ if (activeMQServer != null) {
+ activeMQServer.stop();
+ }
return this;
Review comment:
The existing behavior which allows a `NullPointerException` is
functionally no different from checking for `null` and throwing some other kind
of `RuntimeException` (e.g. `java.lang.IllegalArgumentException`). The Jira was
opened specifically to avoid such an exception.
--
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]