Fixed - Tomcat session getAttributeNames() method doesn't take in account localcached attributes #3057

pull/3083/head
Nikita Koksharov 4 years ago
parent 62d968559d
commit 2e9094af01

@ -145,7 +145,11 @@ public class RedissonSession extends StandardSession {
throw new IllegalStateException
(sm.getString("standardSession.getAttributeNames.ise"));
}
return Collections.enumeration(map.readAllKeySet());
Set<String> attributeKeys = new HashSet<>();
attributeKeys.addAll(map.readAllKeySet());
attributeKeys.addAll(loadedAttributes.keySet());
return Collections.enumeration(attributeKeys);
}
return super.getAttributeNames();

@ -145,7 +145,11 @@ public class RedissonSession extends StandardSession {
throw new IllegalStateException
(sm.getString("standardSession.getAttributeNames.ise"));
}
return Collections.enumeration(map.readAllKeySet());
Set<String> attributeKeys = new HashSet<>();
attributeKeys.addAll(map.readAllKeySet());
attributeKeys.addAll(loadedAttributes.keySet());
return Collections.enumeration(attributeKeys);
}
return super.getAttributeNames();

@ -145,7 +145,11 @@ public class RedissonSession extends StandardSession {
throw new IllegalStateException
(sm.getString("standardSession.getAttributeNames.ise"));
}
return Collections.enumeration(map.readAllKeySet());
Set<String> attributeKeys = new HashSet<>();
attributeKeys.addAll(map.readAllKeySet());
attributeKeys.addAll(loadedAttributes.keySet());
return Collections.enumeration(attributeKeys);
}
return super.getAttributeNames();

Loading…
Cancel
Save