Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-1965

StreamMessage.writeObject() ignores Long data type

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 5.2.0
    • Component/s: Broker
    • Labels:
      None

      Description

      streamMessage.writeObject(new Long("1")) is silently ignored, nothing is written to the message body. The ActiveMQStreamMessage is missing one 'if' clause for the Long datatype.

      ConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=false");
              Session session = cf.createConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
      
              StreamMessage sm = session.createStreamMessage();
      
              sm.writeObject(new Long("1"));
              // reset so it's readable now
              sm.reset();
              assertEquals(new Long("1"), sm.readObject());
      

        Attachments

          Activity

            People

            • Assignee:
              rajdavies Robert Davies
              Reporter:
              aperepel Andrew Grande
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: