This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.discovery.base-1.0.2 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-discovery-base.git
commit c49512ef2904206acda6224fcc60bf2b46e3bb47 Author: Stefan Egli <[email protected]> AuthorDate: Mon Nov 2 14:41:59 2015 +0000 SLING-5216 : another VotingHandler test case added - changed analyzeVotings return value for this - but no other changes to the analyzeVotings algo or code git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/base@1712016 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/sling/discovery/base/its/setup/mock/MockedResource.java | 3 +++ .../sling/discovery/base/its/setup/mock/MockedResourceResolver.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResource.java b/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResource.java index a0b5efe..bbd459d 100644 --- a/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResource.java +++ b/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResource.java @@ -33,6 +33,7 @@ import javax.jcr.PropertyIterator; import javax.jcr.PropertyType; import javax.jcr.RepositoryException; import javax.jcr.Session; +import javax.jcr.Value; import org.apache.sling.api.resource.ModifiableValueMap; import org.apache.sling.api.resource.SyntheticResource; @@ -193,6 +194,8 @@ public class MockedResource extends SyntheticResource { node.setProperty(arg0, c); } else if (arg1 instanceof Long) { node.setProperty(arg0, (Long)arg1); + } else if (arg1 == null) { + node.setProperty(arg0, (Value)null); } else { throw new UnsupportedOperationException(); } diff --git a/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResourceResolver.java b/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResourceResolver.java index aa94ff4..e4a49a1 100644 --- a/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResourceResolver.java +++ b/src/test/java/org/apache/sling/discovery/base/its/setup/mock/MockedResourceResolver.java @@ -34,6 +34,7 @@ import javax.jcr.Repository; import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.SimpleCredentials; +import javax.jcr.Value; import javax.servlet.http.HttpServletRequest; import org.apache.sling.api.resource.LoginException; @@ -287,6 +288,8 @@ public class MockedResourceResolver implements ResourceResolver { child.setProperty(entry.getKey(), (Boolean)entry.getValue()); } else if (entry.getValue() instanceof Calendar) { child.setProperty(entry.getKey(), (Calendar)entry.getValue()); + } else if (entry.getValue() == null) { + child.setProperty(entry.getKey(), (Value)null); } else { throw new UnsupportedOperationException("Not implemented (entry.getValue(): "+entry.getValue()+")"); } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
