Fix exception string to reflect type being read.
This commit is contained in:
Timothy Bish 2015-03-03 16:51:21 -05:00
parent 4b346360be
commit 4d5bb4ab7b
1 changed files with 3 additions and 3 deletions

View File

@ -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());
}
}