Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.3, 2.2.6
-
None
-
Unknown
-
Description
The feed plugin update thread "update" method is public and can be called from "outside" the daemonized update thread. This is for example what XWiki Watch use to do in the LoadingStatus page when forced update was requested :
if (request.force=="1") { xwiki.feed.getUpdateThread(request.space).update(); } else {
This use case has an issue with the current implementation since the update method deletes the current execution context, which is here the request one, not the daemon one (so when later on code relies on it - for example to get the XWikiContext - it throws a NPE).
The clean solution is to remove the execution context handling from the update method, making the UpdateThread extend AbstractXWikiRunnable ; which itself will handle the EC initialization/deletion