Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ScheduledTaskRegistrar's task list getters fail with NPE when no tasks set [SPR-13680] #18255
The ScheduledTaskRegistrar must be improved by adding few more helper methods.
The reason I am adding these helper methods as I tried accessing one of the getTriggerTaskList(), getCronTaskList(), getFixedRateTaskList(), getFixedDelayTaskList() which try to return a Collections.unmodifiableList list which does not accept a list object that is not instantiated (null) and throws a null pointer exception in case of null. This left me no other way to do null checks. Adding the helper methods would provide me if I should/shouldn't access it. There is already a helper method hasTasks but does not fit the solution to know if a specific TaskList is empty or null.