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

FindBugs: Dubious method used: System.exit() in CoreMessage#toString()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • Broker
    • None

    Description

      This is weird. Possibly some left over debugging code. I never saw this actually crash Artemis, though. Still, I think it should be changed.

      1079   @Override
      1080   public String toString() {
      1081      try {
      1082         checkProperties();
      1083         return "CoreMessage[messageID=" + messageID + ",durable=" + isDurable() + ",userID=" + getUserID() + ",priority=" + this.getPriority()  +
      1084            ", timestamp=" + toDate(getTimestamp()) + ",expiration=" + toDate(getExpiration()) +
      1085            ", durable=" + durable + ", address=" + getAddress() + ",properties=" + properties + "]@" + System.identityHashCode(this);
      1086      } catch (Throwable e) {
      1087         e.printStackTrace();
          	
      CID 1455427 (#1 of 1): Dm: Dubious method used (FB.DM_EXIT)
      1. defect: org.apache.activemq.artemis.core.message.impl.CoreMessage.toString() invokes System.exit(...), which shuts down the entire virtual machine.
      1088         System.exit(-1);
      1089         return "ServerMessage[messageID=" + messageID + "]";
      1090      }
      1091   }
      

      Attachments

        Issue Links

          Activity

            People

              tabish Timothy A. Bish
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: