mirror of https://github.com/apache/activemq.git
Fix exception string to reflect type being read.
This commit is contained in:
parent
4b346360be
commit
4d5bb4ab7b
|
@ -312,13 +312,13 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
|
|||
public char getChar(String name) throws JMSException {
|
||||
initializeReading();
|
||||
Object value = map.get(name);
|
||||
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
if (value instanceof Character) {
|
||||
} else if (value instanceof Character) {
|
||||
return ((Character)value).charValue();
|
||||
} else {
|
||||
throw new MessageFormatException(" cannot read a short from " + value.getClass().getName());
|
||||
throw new MessageFormatException(" cannot read a char from " + value.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue