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

Core JMS does not permit calling Message#getBytes(arbitrary type) when message has empty body

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.3.0
    • 2.5.0
    • Broker
    • None

    Description

      Consider the ActiveMQ Artemis test org.apache.activemq.artemis.tests.integration.jms.jms2client.BodyTest#testBodyConversion adapted to run through multiple JMS ConnectionFactories in turn. This test passes with Core JMS client, is skipped (or should be skipped) with ActiveMQ OpenWire client (that is a JMS 1.1 client) and fails with qpid-jms client.

               BytesMessage bytesMessage = sess.createBytesMessage();
               producer.send(bytesMessage);
      
               Message msg = cons.receiveNoWait();
               assertNotNull(msg);
      
               try {
                  msg.getBody(String.class);
                  fail("Exception expected");
               } catch (MessageFormatException e) {
               }
      

      The test is wrong, see discussion with tabish121 at QPIDJMS-313 for details and references as to why.

      Attachments

        Issue Links

          Activity

            People

              sknot Stanislav Knot
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: