443231 java.lang.NullPointerException on scavenge scheduling when session id manager declared before shared scheduler

This commit is contained in:
Jan Bartel 2014-09-04 11:31:08 +10:00
parent a1587d807e
commit 51715dbcdb
2 changed files with 6 additions and 1 deletions

View File

@ -416,7 +416,10 @@ public class MongoSessionIdManager extends AbstractSessionIdManager
_scheduler = new ScheduledExecutorScheduler();
_ownScheduler = true;
_scheduler.start();
}
}
else if (!_scheduler.isStarted())
throw new IllegalStateException("Shared scheduler not started");
//setup the scavenger thread
if (_scavengePeriod > 0)

View File

@ -992,6 +992,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
_ownScheduler = true;
_scheduler.start();
}
else if (!_scheduler.isStarted())
throw new IllegalStateException("Shared scheduler not started");
setScavengeInterval(getScavengeInterval());
}