|
1) We could leverage isConnectedToSession() instead. But notice that your proposed exception message is (potentially) completely wrong; there may in fact be a Session, but it might be closed, etc. We did the separate checks to make the exception message as specific as possible.
2) It is absolutely incorrect to use a "current session" here.
|