parent
5b04b04b69
commit
aaeabc3c85
|
@ -92,10 +92,11 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
|||
logger.debug("Failed to set JMSType - skipping", ex);
|
||||
}
|
||||
}
|
||||
Set<String> headerNames = headers.keySet();
|
||||
for (String headerName : headerNames) {
|
||||
Set<Map.Entry<String, Object>> entries = headers.entrySet();
|
||||
for (Map.Entry<String, Object> entry : entries) {
|
||||
String headerName = entry.getKey();
|
||||
if (StringUtils.hasText(headerName) && !headerName.startsWith(JmsHeaders.PREFIX)) {
|
||||
Object value = headers.get(headerName);
|
||||
Object value = entry.getValue();
|
||||
if (value != null && SUPPORTED_PROPERTY_TYPES.contains(value.getClass())) {
|
||||
try {
|
||||
String propertyName = this.fromHeaderName(headerName);
|
||||
|
|
|
@ -180,9 +180,9 @@ public class DefaultContextCache implements ContextCache {
|
|||
}
|
||||
|
||||
// Remove empty entries from the hierarchy map.
|
||||
for (MergedContextConfiguration currentKey : this.hierarchyMap.keySet()) {
|
||||
if (this.hierarchyMap.get(currentKey).isEmpty()) {
|
||||
this.hierarchyMap.remove(currentKey);
|
||||
for (Map.Entry<MergedContextConfiguration, Set<MergedContextConfiguration>> entry : this.hierarchyMap.entrySet()) {
|
||||
if (entry.getValue().isEmpty()) {
|
||||
this.hierarchyMap.remove(entry.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,8 +113,7 @@ class SessionAttributesHandler {
|
|||
* @param attributes candidate attributes for session storage
|
||||
*/
|
||||
public void storeAttributes(WebSession session, Map<String, ?> attributes) {
|
||||
attributes.keySet().forEach(name -> {
|
||||
Object value = attributes.get(name);
|
||||
attributes.forEach((name, value) -> {
|
||||
if (value != null && isHandlerSessionAttribute(name, value.getClass())) {
|
||||
session.getAttributes().put(name, value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue