[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextMessage.getText returning null

A lot of changes happened between 5.10 and 5.15.  Knowing the first version
that it broke would be helpful to narrow down the change that broke it.
Even better would be to use 'git bisect' and find the exact commit that
introduced the issue.

On Thu, May 31, 2018 at 3:14 PM, codingismy11to7 <steven@xxxxxxxxxxxxxx>

> I put some text in the (very long) README in the reproduction project that
> kind of addresses this, but I didn't really specify that yes - I did throw
> in a debug library of the wrapper that printed out when the getText() call
> returned null at the call site, and it absolutely is returning null (the
> wrapper takes the value and puts it into an immutable object that cannot be
> modified...barring reflection hacks that aren't happening).
> The library is basically doing :
> consumer.addMessageListener(new MessageListener {
>   def onMessage(message: Message) = {
>     try {
>       // extract message body and properties, getText() if it's a
> TextMessage, copy fields into
>       //   an immutable data structure, hand that off, never touch original
> message again
>   } //... catch elided
> })
> As another datapoint, our code didn't change between the upgrade from AMQ
> 5.10 to 5.15, this problem appeared, and between those two versions is when
> (I believe) the change happened where ActiveMQTextMessage.text was set to
> null during (before? after?) marshaling.
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-
> f2368404.html