}
for (Enumeration<String> enumeration = jmsMessage.getPropertyNames(); enumeration.hasMoreElements();) {
String key = enumeration.nextElement();
if (hasIllegalHeaderKey(key)) {
throw new IllegalHeaderException("Header " + key + " is not a legal JMS header name value");
}
Object value = jmsMessage.getObjectProperty(key);
String decodedName = keyFormatStrategy.decodeKey(key);
headers.put(decodedName, value);
}