-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b04
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8288320 | 11.0.17-oracle | Shivangi Gupta | P4 | Resolved | Fixed | b01 |
JDK-8288869 | 11.0.17 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
JDK-8304297 | 8u381 | Shivangi Gupta | P4 | Resolved | Fixed | b01 |
A certain part in the SessionTimeOutTests currently has the following check:
String isTimedout = "YES";
...
if (nextSess != null) {
if (isEqualSessionId(nextSess.getId(), sess.getId())) {
isTimedout = "NO";
nextSess = null;
}
} else if (e.hasMoreElements()) {
nextSess = sessCtx.getSession((byte[]) e.nextElement());
if ((nextSess != null) && isEqualSessionId(nextSess.getId(),
sess.getId())) {
nextSess = null;
isTimedout = "NO";
}
}
....
if ((timeout != 0) && (lifetime > timeout) &&
(isTimedout.equals("NO"))) {
throw new Exception("Session timeout test failed for session: "
+ sess + " lifetime: " + lifetime);
}
if (((timeout == 0) || (lifetime < timeout)) &&
(isTimedout == "YES")) {
isTimedout = "Invalidated before timeout";
}
The isTimedout == "YES" isn't right and should instead use the equals() method, just like it does for the "NO" check a few lines above.
String isTimedout = "YES";
...
if (nextSess != null) {
if (isEqualSessionId(nextSess.getId(), sess.getId())) {
isTimedout = "NO";
nextSess = null;
}
} else if (e.hasMoreElements()) {
nextSess = sessCtx.getSession((byte[]) e.nextElement());
if ((nextSess != null) && isEqualSessionId(nextSess.getId(),
sess.getId())) {
nextSess = null;
isTimedout = "NO";
}
}
....
if ((timeout != 0) && (lifetime > timeout) &&
(isTimedout.equals("NO"))) {
throw new Exception("Session timeout test failed for session: "
+ sess + " lifetime: " + lifetime);
}
if (((timeout == 0) || (lifetime < timeout)) &&
(isTimedout == "YES")) {
isTimedout = "Invalidated before timeout";
}
The isTimedout == "YES" isn't right and should instead use the equals() method, just like it does for the "NO" check a few lines above.
- backported by
-
JDK-8288320 SessionTimeOutTests uses == operator for String value check
- Resolved
-
JDK-8288869 SessionTimeOutTests uses == operator for String value check
- Resolved
-
JDK-8304297 SessionTimeOutTests uses == operator for String value check
- Resolved