Menu

#328 DLQHandler-Bug

open
nobody
5
2002-12-10
2002-12-10
No

org.jboss.ejb.plugins.jms.DLQHandler throws
NullPointerException in makeWritable() when copying
properties with value null ( caused by Hashmap.put() )

Patch: modify copy loop by replace null string with
empty "" string prior to Hashmap.put() call .

protected Message makeWritable(Message msg)
throws JMSException
{
Hashtable tmp = new Hashtable();
// Save properties
for(Enumeration en = msg.getPropertyNames
();en.hasMoreElements();)
{
String key = (String) en.nextElement();

/******* Patch ******
String value = msg.getStringProperty(key);

if( value == null )
value = "";

tmp.put(key,value);
}
......
......

Discussion


Log in to post a comment.