You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2021/04/15 10:53:51 UTC
[sling-org-apache-sling-scripting-core] branch master updated:
SLING-9999 - Remove cyclic dependency between scripting and servlets
features
This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-core.git
The following commit(s) were added to refs/heads/master by this push:
new 5ec46d4 SLING-9999 - Remove cyclic dependency between scripting and servlets features
5ec46d4 is described below
commit 5ec46d42bd92107acbc23d201a30eb7b109f6ff9
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Apr 15 12:32:35 2021 +0200
SLING-9999 - Remove cyclic dependency between scripting and servlets features
* moved ResourceType to o.a.s.api.resource.type
---
pom.xml | 2 +-
.../scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index c813149..b54b903 100644
--- a/pom.xml
+++ b/pom.xml
@@ -163,7 +163,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.scripting.spi</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java b/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java
index 4bbecff..874eeca 100644
--- a/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java
+++ b/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java
@@ -26,11 +26,11 @@ import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
+import org.apache.sling.api.resource.type.ResourceType;
import org.apache.sling.commons.compiler.source.JavaEscapeHelper;
import org.apache.sling.scripting.spi.bundle.BundledRenderUnit;
import org.apache.sling.scripting.spi.bundle.BundledRenderUnitCapability;
import org.apache.sling.scripting.spi.bundle.BundledRenderUnitFinder;
-import org.apache.sling.scripting.spi.bundle.ResourceType;
import org.apache.sling.scripting.spi.bundle.TypeProvider;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -113,7 +113,7 @@ public class BundleRenderUnitFinderImpl implements BundledRenderUnitFinder {
for (int i = selectors.length - 1; i >= 0; i--) {
String base =
resourceType.getType() +
- (StringUtils.isNotEmpty(resourceType.getVersion()) ? SLASH + resourceType.getVersion() + SLASH :
+ (resourceType.getVersion() != null ? SLASH + resourceType.getVersion() + SLASH :
SLASH) +
String.join(SLASH, Arrays.copyOf(selectors, i + 1));
if (StringUtils.isNotEmpty(extension)) {
@@ -130,7 +130,7 @@ public class BundleRenderUnitFinderImpl implements BundledRenderUnitFinder {
}
}
String base = resourceType.getType() +
- (StringUtils.isNotEmpty(resourceType.getVersion()) ? SLASH + resourceType.getVersion() : StringUtils.EMPTY);
+ (resourceType.getVersion() != null ? SLASH + resourceType.getVersion() : StringUtils.EMPTY);
if (StringUtils.isNotEmpty(extension)) {
if (StringUtils.isNotEmpty(method)) {