Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
In line 333 in file ScaleDownHandler.java variable queueCreateSession is initialized
ClientSession queueCreateSession = sessionFactory.createSession(user, password, false, true, true, false, 0);
In line 851 in ClientSessionFactoryImp.java, the code synchronizes with the sessions collection and checks whether the current session is closed or whether the client protocol manager is down. If the closed session or inactive client protocol manager condition is met, the session is closed and null is returned
if (closed || !clientProtocolManager.isAlive()) { session.close(); return null; }
The queueCreateSession variable could potentially be null.
In line 357 in file ScaleDownHandler.java variable queueCreateSession is passed to the function createQueueWithRoutingTypeIfNecessaryAndGetID as the first argument:
queueID = createQueueWithRoutingTypeIfNecessaryAndGetID(queueCreateSession, queue, message.getAddressSimpleString(), message.getRoutingType());
In line 450 in file ScaleDownHandler.java potential null dereference occurs:
session.createQueue(new QueueConfiguration(...));