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 {
|
public char getChar(String name) throws JMSException {
|
||||||
initializeReading();
|
initializeReading();
|
||||||
Object value = map.get(name);
|
Object value = map.get(name);
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
} else if (value instanceof Character) {
|
||||||
if (value instanceof Character) {
|
|
||||||
return ((Character)value).charValue();
|
return ((Character)value).charValue();
|
||||||
} else {
|
} 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