Ivan Sopov opened SPR-16189 and commented
WebSocketConfigurationSupport.defaultSockJsTaskScheduler() produces TaskScheduler bean and adds it to application context. But if SockJS is not used and not configured - it creates NoOpScheduler that can only throw IllegalStateExceptions. If other component is added to context that requires TaskScheduler it picks that NoOpScheduler and fails with "Unexpected use of scheduler" on it use instead of "No such bean" on creation.
It seems to me that it will be better not to add such NoOpScheduler to application context since it is not usable in any way.
Affects: 5.0.1
Issue Links:
Referenced from: commits 3d6e38b, 6aa6d91
0 votes, 5 watchers
Ivan Sopov opened SPR-16189 and commented
WebSocketConfigurationSupport.defaultSockJsTaskScheduler() produces TaskScheduler bean and adds it to application context. But if SockJS is not used and not configured - it creates NoOpScheduler that can only throw IllegalStateExceptions. If other component is added to context that requires TaskScheduler it picks that NoOpScheduler and fails with "Unexpected use of scheduler" on it use instead of "No such bean" on creation.
It seems to me that it will be better not to add such NoOpScheduler to application context since it is not usable in any way.
Affects: 5.0.1
Issue Links:
@Bean("depends on")Referenced from: commits 3d6e38b, 6aa6d91
0 votes, 5 watchers