You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by js...@apache.org on 2025/01/15 13:54:15 UTC

(sling-org-apache-sling-feature-extension-content) 01/01: SLING-10417 - fix possible regression

This is an automated email from the ASF dual-hosted git repository.

jsedding pushed a commit to branch SLING-10417-fix-possible-regression
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-extension-content.git

commit 999c16040e4826b12c118052b724c2f1df638129
Author: Julian Sedding <js...@apache.org>
AuthorDate: Wed Jan 15 14:44:58 2025 +0100

    SLING-10417 - fix possible regression
---
 .../org/apache/sling/feature/extension/content/ContentHandler.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
index c5dc8eb..3575272 100644
--- a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
+++ b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
@@ -62,7 +62,7 @@ public class ContentHandler implements ExtensionHandler {
         for (final Artifact a : artifacts) {
             final URL file = prepareContext.getArtifactFile(a.getId());
             File tmp = IOUtils.getFileFromURL(file, true, null);
-            if (tmp != null) {
+            if (tmp != null && tmp.length() > 0) {
                 packageReferences.add(tmp);
             }
         }
@@ -98,9 +98,9 @@ public class ContentHandler implements ExtensionHandler {
         File registryHome = getRegistryHomeDir(context);
         if (extension.getType() == ExtensionType.ARTIFACTS
                 && extension.getName().equals(Extension.EXTENSION_NAME_CONTENT_PACKAGES)) {
-        	
+
         	boolean useStrictMode = Boolean.getBoolean(getClass().getPackageName()+ ".useStrictMode");
-        	
+
             Map<Integer, Collection<Artifact>> orderedArtifacts = new TreeMap<>();
             for (final Artifact a : extension.getArtifacts()) {
                 int order;