You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2025/09/04 19:15:00 UTC
[jira] [Resolved] (SLING-12895) Improve exception handling when invalid packages are given
[ https://issues.apache.org/jira/browse/SLING-12895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konrad Windszus resolved SLING-12895.
-------------------------------------
Fix Version/s: Content-Package to Feature Model Converter 1.3.12
Resolution: Fixed
Fixed in https://github.com/apache/sling-org-apache-sling-feature-cpconverter/commit/ffb2039dee744c9fe832cf045dff3664654ebbe6.
> Improve exception handling when invalid packages are given
> ----------------------------------------------------------
>
> Key: SLING-12895
> URL: https://issues.apache.org/jira/browse/SLING-12895
> Project: Sling
> Issue Type: Improvement
> Components: Content-Package to Feature Model Converter
> Affects Versions: Content-Package to Feature Model Converter 1.3.10
> Reporter: Konrad Windszus
> Assignee: Konrad Windszus
> Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.3.12
>
>
> The following NPE is currently thrown when invalid content packages are given:
> {code}
> [INFO] [INFO] Reading content-package '...invalid.package.zip'...
> [INFO] [WARNING] Package does not specify a version. setting to ''
> [INFO] [WARNING] Package properties not valid. need group and name property.
> java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.putVal (ConcurrentHashMap.java:1011)
> at java.util.concurrent.ConcurrentHashMap.put (ConcurrentHashMap.java:1006)
> at org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.firstPass (ContentPackage2FeatureModelConverter.java:313)
> at org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.convert (ContentPackage2FeatureModelConverter.java:296)
> {code}
> The NPE is thrown at https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/d75256c7ed76281f411f4275ea2afe79bf395cbc/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java#L313 because the package does not have an ID.
> This was detected in the context of https://github.com/adobe/aemanalyser-maven-plugin/issues/342.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)