[ openjms-Bugs-673993 ] class IntravmSessionStub does not accept null messages.
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #673993, was opened at 2003-01-24 13:12
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=673993&group_id=54559
Category: client
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Raicho Minev (raicho)
Assigned to: Jim Alateras (jalateras)
Summary: class IntravmSessionStub does not accept null messages.
Initial Comment:
I am using embedded JMS server and intravm jndi for
connecting.
The problem occurs when the JmsServerSession class
tries to send a "ping" like isClientEndpointActive()
request, because it sends a null message. A null pointer
exception is then thrown by the onMessage method,
when it tries to clone the message object for the intravm
client:
public void onMessage(Message message)
{
...
try {
copy = (Message) ((MessageImpl) message).clone();
} catch (CloneNotSupportedException exception) {
getLogger().logException(exception);
}
...
}
I suggest surrounding the clone operation with a "not
null" check:
public void onMessage(Message message)
{
...
if(message != null) {
try {
copy = (Message) ((MessageImpl) message).clone ();
} catch (CloneNotSupportedException exception) {
getLogger().logException(exception);
}
}
...
}
The following methods also clone messages and do not
check for nulls and will probably have similar porblems:
sendMessage()
receiveMessages()
onMessages()
----------------------------------------------------------------------
>Comment By: Tim Anderson (tanderson)
Date: 2003-01-24 14:29
Message:
Logged In: YES
user_id=557161
This was fixed in CVS on 18/12, and will be available in
the 0.7.4 release.
(See http://sourceforge.net/forum/message.php?
msg_id=1799579)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=673993&group_id=54559