You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by re...@apache.org on 2024/08/07 08:53:19 UTC
(sling-org-apache-sling-resourceresolver) 01/01: SLING-12401: MapEntries.isAliasValid() misnamed - rename to isAloasInvalid()
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch SLING-12401
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
commit 469d7303a6d615eb38a4b8bc76d0413a66237ef2
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Aug 7 09:51:55 2024 +0100
SLING-12401: MapEntries.isAliasValid() misnamed - rename to isAloasInvalid()
---
.../org/apache/sling/resourceresolver/impl/mapping/MapEntries.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
index 792ec7b..73fed11 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
@@ -1269,7 +1269,7 @@ public class MapEntries implements
log.debug("Found alias, total size {}", aliasArray.length);
// the order matters here, the first alias in the array must come first
for (final String alias : aliasArray) {
- if (isAliasValid(alias)) {
+ if (isAliasInvalid(alias)) {
log.warn("Encountered invalid alias {} under parent path {}. Refusing to use it.", alias, parentPath);
} else {
Map<String, Collection<String>> parentMap = map.computeIfAbsent(parentPath, key -> new ConcurrentHashMap<>());
@@ -1297,7 +1297,7 @@ public class MapEntries implements
/**
* Check alias syntax
*/
- private static boolean isAliasValid(String alias) {
+ private static boolean isAliasInvalid(String alias) {
boolean invalid = alias.equals("..") || alias.equals(".");
if (!invalid) {
for (final char c : alias.toCharArray()) {