You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2022/02/07 14:59:00 UTC
[jira] [Resolved] (ARTEMIS-2582) EmbeddedActiveMQ.stop() should check for null
[ https://issues.apache.org/jira/browse/ARTEMIS-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Bertram resolved ARTEMIS-2582.
-------------------------------------
Fix Version/s: 2.21.0
Resolution: Fixed
> EmbeddedActiveMQ.stop() should check for null
> ---------------------------------------------
>
> Key: ARTEMIS-2582
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2582
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.10.1
> Reporter: SL
> Priority: Trivial
> Labels: easy
> Fix For: 2.21.0
>
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/embedded/EmbeddedActiveMQ.java
> when calling {{EmbeddedActiveMQ.stop()}} method, there is no guarantee that the init was called or successful (responsability of the caller)
> the method should check that activeMQServer is not null
> {code:java}
> public EmbeddedActiveMQ stop() throws Exception {
> + if (activeMQServer != null) {
> activeMQServer.stop();
> + }
> return this;
> }
> {code}
> use case : after methods in unit tests.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)