[ 
https://issues.apache.org/jira/browse/ARTEMIS-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488162#comment-17488162
 ] 

ASF subversion and git services commented on ARTEMIS-2582:
----------------------------------------------------------

Commit dbb4cd0a7a239049b6764199d5865237714f067d in activemq-artemis's branch 
refs/heads/main from nbrendah
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=dbb4cd0 ]

ARTEMIS-2582: EmbeddedActiveMQ.stop() should check for null


> 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
>          Time Spent: 2h 50m
>  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)

Reply via email to