diff --git a/spring-jms/src/main/java/org/springframework/jms/support/SimpleJmsHeaderMapper.java b/spring-jms/src/main/java/org/springframework/jms/support/SimpleJmsHeaderMapper.java index 6e02987638..5a513bafbd 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/SimpleJmsHeaderMapper.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/SimpleJmsHeaderMapper.java @@ -93,8 +93,7 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper impleme logger.debug("Failed to set JMSType - skipping", ex); } } - Set> entries = headers.entrySet(); - for (Map.Entry entry : entries) { + for (Map.Entry entry : headers.entrySet()) { String headerName = entry.getKey(); if (StringUtils.hasText(headerName) && !headerName.startsWith(JmsHeaders.PREFIX)) { Object value = entry.getValue();