Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Added usage of AuthRecord.VALID_TO
......................................................................


Patch Set 20:

(4 comments)

http://gerrit.ovirt.org/#/c/26975/20/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/session/SessionDataContainer.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/session/SessionDataContainer.java:

Line 116
Line 117
Line 118
Line 119
Line 120
no need for this one line private function.


Line 141: 
Line 142:         Iterator<Entry<String, SessionInfo>> iterator = 
sessionInfoMap.entrySet().iterator();
Line 143:         while (iterator.hasNext()) {
Line 144:             ConcurrentMap<String, Object> sessionMap = 
iterator.next().getValue().contentOfSession;
Line 145:             Date hardLimit = 
sessionMap.containsKey(HARD_LIMIT_PARAMETER_NAME) ? (Date) 
sessionMap.get(HARD_LIMIT_PARAMETER_NAME) : null;
why can't you just get?
Line 146:             Date softLimit = (Date) 
sessionMap.get(SOFT_LIMIT_PARAMETER_NAME);
Line 147: 
Line 148:             if (hardLimit != null) {
Line 149:                 if (hardLimit.before(now)) {


Line 249:     }
Line 250: 
Line 251:     public Object getData(String key, boolean refresh) {
Line 252:         return getData(ThreadLocalParamsContainer.getHttpSessionId(), 
key, refresh);
Line 253:     }
put all getData() at same place?
Line 254: 
Line 255:     public void refresh() {
Line 256:         
refresh(getSessionInfo(ThreadLocalParamsContainer.getHttpSessionId()));
Line 257:     }


Line 260:         Date now = new Date();
Line 261:         Date softLimit = (Date) 
sessionInfo.contentOfSession.get(SOFT_LIMIT_PARAMETER_NAME);
Line 262:         if (softLimit == null) {
Line 263:             softLimit = now;
Line 264:         }
on the 10th time... why do you need to get the soft limit at refresh?!?!?
Line 265: 
Line 266:         int softLimitValue = Config.<Integer> 
getValue(ConfigValues.UserSessionTimeOutInterval);
Line 267:         if (softLimitValue > 0) {
Line 268:             
sessionInfo.contentOfSession.put(SOFT_LIMIT_PARAMETER_NAME, 
DateUtils.addMinutes(now, softLimitValue));


-- 
To view, visit http://gerrit.ovirt.org/26975
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I53e4a371c1bae8d2480ddd2af921a560c6fe9a85
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to