Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
14.10.11
-
None
-
Unknown
-
Description
If an XML history file is malformed (e.g. it's not finished, see below), the DefaultExtensionJobHistory wrongly produces a NPE instead of informing about the malformed XML, with the following stacktrace:
2023-05-25 16:34:29,372 [main] ERROR h.i.DefaultExtensionJobHistory - Failed to read extension job history from [/var/lib/xwiki/data/extension/history/2022.01.22.xml]. java.lang.NullPointerException: null at java.base/java.util.Collections.reverse(Collections.java:379) at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory.load(DefaultExtensionJobHistory.java:176) at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory.initialize(DefaultExtensionJobHistory.java:112)
Example of such malformed XML:
</org.xwiki.extension.job.history.ExtensionJobHistoryRecord><org.xwiki.extension.job.history.ExtensionJobHistoryRecord> <jobType>searchflavors</jobType> <request class="org.xwiki.platform.flavor.job.FlavorSearchRequest"> <id> <string>flavor</string> <string>search</string> <string>wiki:subwiki</string> </id> <properties> <entry> <string>extensions</string> <list/> </entry> <entry> <string>extensio