This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.discovery.commons-1.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-discovery-commons.git
commit 1a3602926c75e1f6e3c15346886de33bdfff4b81 Author: Stefan Egli <[email protected]> AuthorDate: Thu Oct 22 15:32:29 2015 +0000 SLING-5173 : added simple implementation for findInstances git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/commons@1710036 13f79535-47bb-0310-9956-ffa450edef68 --- .../sling/discovery/commons/providers/DummyTopologyView.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/sling/discovery/commons/providers/DummyTopologyView.java b/src/test/java/org/apache/sling/discovery/commons/providers/DummyTopologyView.java index d1962f8..b5314ad 100644 --- a/src/test/java/org/apache/sling/discovery/commons/providers/DummyTopologyView.java +++ b/src/test/java/org/apache/sling/discovery/commons/providers/DummyTopologyView.java @@ -121,7 +121,13 @@ public class DummyTopologyView extends BaseTopologyView { @Override public Set<InstanceDescription> findInstances(InstanceFilter filter) { - throw new IllegalStateException("not yet implemented"); + Set<InstanceDescription> result = new HashSet<InstanceDescription>(); + for (InstanceDescription instanceDescription : instances) { + if (filter.accept(instanceDescription)) { + result.add(instanceDescription); + } + } + return result; } @Override -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
