You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2019/09/06 07:14:05 UTC

[sling-org-apache-sling-installer-core] branch master updated: SLING-8680 bail out early if this is not a ".jar" resource

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

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 33eeae6  SLING-8680 bail out early if this is not a ".jar" resource
33eeae6 is described below

commit 33eeae619c5aae2a7a52903edbdd6a85b08e0891
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Sep 6 09:13:59 2019 +0200

    SLING-8680 bail out early if this is not a ".jar" resource
---
 .../java/org/apache/sling/installer/core/impl/DefaultTransformer.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/sling/installer/core/impl/DefaultTransformer.java b/src/main/java/org/apache/sling/installer/core/impl/DefaultTransformer.java
index 33466e1..354b2f1 100644
--- a/src/main/java/org/apache/sling/installer/core/impl/DefaultTransformer.java
+++ b/src/main/java/org/apache/sling/installer/core/impl/DefaultTransformer.java
@@ -85,6 +85,10 @@ public class DefaultTransformer
      * @return
      */
     private TransformationResult[] checkBundle(final RegisteredResource resource) {
+        if (!resource.getURL().endsWith(".jar")) {
+            logger.debug("Skip transforming non jar resource {}", resource.getURL());
+            return null;
+        }
         logger.debug("Checking headers for {}", resource);
         final Util.BundleHeaders headers = Util.readBundleHeaders(resource, logger);
         logger.debug("Found headers for {} : {}", resource, headers);