Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Content-Package to Feature Model Converter 1.1.14
-
None
-
None
Description
the ContentPackage2FeatureModelConverter contains a bunch of fields that are only populated when calling the corresponding setters.
while the ContentPackage2FeatureModelConverterLauncher client gets naturally adjusted when new the converter gets extended, this may easily lead to NPE when the converter is used outside of the client code.
the most recent example where we ran into a NPE was the introduction of the 'indexManager' with SLING-11134, but the problem also applies to the acl-Manager, the bundleSlingInitialContentExtractor and maybe others that get accessed throughout the conversion without checking for null.
we should either extend the code to handle missing managers/extractors gracefully in case they are optional, or initialize defaults (e.g. possible for the indexManager) or verify that the converter has been properly initialized with all mandatory setters called before running the conversion.
note: ideally fixing this would also make the corresponding getters to return a non-null value as we have potential NPE also with calls to ContentPackage2FeatureModelConverterLauncher.getAclManager().