Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2582

EmbeddedActiveMQ.stop() should check for null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.10.1
    • 2.21.0
    • Broker

    Description

      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

         public EmbeddedActiveMQ stop() throws Exception {
      +      if (activeMQServer != null) {
                 activeMQServer.stop();
      +      }
            return this;
         }
      

      use case : after methods in unit tests.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              slx SL
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m