ahgittin commented on a change in pull request #1157:
URL: https://github.com/apache/brooklyn-server/pull/1157#discussion_r604695950
##########
File path:
rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/MultiSessionAttributeAdapter.java
##########
@@ -638,12 +638,22 @@ public MultiSessionAttributeAdapter resetExpiration() {
Handler[] hh = getSessionHandlers();
if (hh!=null) {
for (Handler h: hh) {
- Session ss = ((SessionHandler)h).getSession(getId());
- if (ss!=null) {
+ Session ss = getSessionSafely(h, getId());
+ if (ss != null) {
ss.setMaxInactiveInterval(maxInativeInterval);
}
}
}
return this;
}
+
+ private static Session getSessionSafely(Handler h, String id) {
+ if (((SessionHandler)h).getSessionCache()==null) {
Review comment:
+1 worth adding now that it is refactored
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]