You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2022/03/31 13:57:13 UTC
[sling-org-apache-sling-feature-cpconverter] branch issue/SLING-11239 created (now 4d59241)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to branch issue/SLING-11239
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git.
at 4d59241 SLING-11239 - ContentPackage2FeatureModelConverter prone to NPE
This branch includes the following new commits:
new 7e128a2 Remove unused imports
new 4d59241 SLING-11239 - ContentPackage2FeatureModelConverter prone to NPE
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[sling-org-apache-sling-feature-cpconverter] 02/02: SLING-11239 - ContentPackage2FeatureModelConverter prone to NPE
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch issue/SLING-11239
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git
commit 4d59241e74eaf68cc8da1491e2f0ee097c1b82d0
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Mar 31 15:56:49 2022 +0200
SLING-11239 - ContentPackage2FeatureModelConverter prone to NPE
Add a test that demonstrates the problem
---
.../cpconverter/ContentPackage2FeatureModelConverterTest.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java b/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java
index 0cba797..fae152a 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java
@@ -218,6 +218,15 @@ public class ContentPackage2FeatureModelConverterTest extends AbstractConverterT
}
@Test
+ public void convertContentPackageWithDefaultConverter() throws Exception {
+ // this test verifies that the converter functions without any explicit dependencies set
+ // please ensure that it always passes and do not modify it to configure dependen
+ converter.close();
+ converter = new ContentPackage2FeatureModelConverter();
+ convertContentPackage();
+ }
+
+ @Test
public void convertContentPackageDropContentTypePackagePolicy() throws Exception {
URL packageUrl = getClass().getResource("test-content-package.zip");
File packageFile = FileUtils.toFile(packageUrl);
[sling-org-apache-sling-feature-cpconverter] 01/02: Remove unused imports
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch issue/SLING-11239
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git
commit 7e128a2825b31f6fde04409443b3a3be684ea26e
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Mar 31 15:55:29 2022 +0200
Remove unused imports
---
.../feature/cpconverter/ContentPackage2FeatureModelConverterTest.java | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java b/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java
index 4aea947..0cba797 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverterTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.sling.feature.cpconverter;
-import static org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.SlingInitialContentPolicy.EXTRACT_AND_REMOVE;
import static org.apache.sling.feature.cpconverter.Util.normalize;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -67,8 +66,6 @@ import org.apache.sling.feature.cpconverter.features.DefaultFeaturesManager;
import org.apache.sling.feature.cpconverter.filtering.RegexBasedResourceFilter;
import org.apache.sling.feature.cpconverter.handlers.DefaultEntryHandlersManager;
import org.apache.sling.feature.cpconverter.handlers.EntryHandlersManager;
-import org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.BundleSlingInitialContentExtractor;
-import org.apache.sling.feature.cpconverter.shared.ConverterConstants;
import org.apache.sling.feature.cpconverter.vltpkg.DefaultPackagesEventsEmitter;
import org.apache.sling.feature.io.json.FeatureJSONReader;
import org.junit.After;