This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.resourceresolver-1.0.6 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
commit a5139aabc0940705a0a1536007d5d6cd2c478581 Author: Bertrand Delacretaz <bdelacre...@apache.org> AuthorDate: Wed Apr 10 11:34:32 2013 +0000 SLING-2819 - check for null path in mangleNamespaces, and activate corresponding tests git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver@1466432 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java | 2 +- .../resourceresolver/impl/ResourceResolverMangleNamespacesTest.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java index 0ffe9e4..bfbe6f7 100644 --- a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java +++ b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java @@ -966,7 +966,7 @@ public class ResourceResolverImpl extends SlingAdaptable implements ResourceReso } private String mangleNamespaces(String absPath) { - if (factory.isMangleNamespacePrefixes() && absPath.contains(MANGLE_NAMESPACE_OUT_SUFFIX)) { + if (factory.isMangleNamespacePrefixes() && absPath != null && absPath.contains(MANGLE_NAMESPACE_OUT_SUFFIX)) { final Pattern p = Pattern.compile(MANGLE_NAMESPACE_OUT); final Matcher m = p.matcher(absPath); diff --git a/src/test/java/org/apache/sling/resourceresolver/impl/ResourceResolverMangleNamespacesTest.java b/src/test/java/org/apache/sling/resourceresolver/impl/ResourceResolverMangleNamespacesTest.java index ffdc065..9d7078f 100644 --- a/src/test/java/org/apache/sling/resourceresolver/impl/ResourceResolverMangleNamespacesTest.java +++ b/src/test/java/org/apache/sling/resourceresolver/impl/ResourceResolverMangleNamespacesTest.java @@ -27,7 +27,6 @@ import org.apache.sling.api.resource.Resource; import org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext; import org.apache.sling.resourceresolver.impl.tree.RootResourceProviderEntry; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; @@ -116,7 +115,6 @@ public class ResourceResolverMangleNamespacesTest { } @Test - @Ignore("SLING-2819") public void testUrlNoPath() { assertEquals("http://withSlash.com/", rr.map("http://withSlash.com/")); assertEquals("http://noSlash.com", rr.map("http://noSlash.com")); @@ -124,7 +122,6 @@ public class ResourceResolverMangleNamespacesTest { } @Test - @Ignore("SLING-2819") public void testWeirdCases() { assertEquals("http://foo", rr.map("http://foo")); assertEquals("http://", rr.map("http://")); -- To stop receiving notification emails like this one, please contact "commits@sling.apache.org" <commits@sling.apache.org>.