incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r586321 - in /incubator/sling/whiteboard/microsling/src: main/java/org/apache/sling/microsling/services/MicroslingServiceLocator.java test/java/org/apache/sling/microsling/services/MicroslingServiceLocatorTest.java
Date Fri, 19 Oct 2007 08:26:19 GMT
Author: bdelacretaz
Date: Fri Oct 19 01:26:18 2007
New Revision: 586321

URL: http://svn.apache.org/viewvc?rev=586321&view=rev
Log:
SLING-55 - MicroslingServiceLocator.getServices() returns null instead of throwing an Exception

Modified:
    incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/services/MicroslingServiceLocator.java
    incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/services/MicroslingServiceLocatorTest.java

Modified: incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/services/MicroslingServiceLocator.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/services/MicroslingServiceLocator.java?rev=586321&r1=586320&r2=586321&view=diff
==============================================================================
--- incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/services/MicroslingServiceLocator.java
(original)
+++ incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/services/MicroslingServiceLocator.java
Fri Oct 19 01:26:18 2007
@@ -51,10 +51,9 @@
         return result;
     }
 
-    public Object[] getServices(String serviceName, String filter) 
-    throws InvalidServiceFilterSyntaxException {
-        throw new InvalidServiceFilterSyntaxException(
-                "Sorry, MicroslingServiceLocator.getServices is not implemented");
+    public Object[] getServices(String serviceName, String filter) {
+        // we don't have this feature
+        return null;
     }
 
 }

Modified: incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/services/MicroslingServiceLocatorTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/services/MicroslingServiceLocatorTest.java?rev=586321&r1=586320&r2=586321&view=diff
==============================================================================
--- incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/services/MicroslingServiceLocatorTest.java
(original)
+++ incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/services/MicroslingServiceLocatorTest.java
Fri Oct 19 01:26:18 2007
@@ -71,4 +71,13 @@
             fail("Unexpected Exception in getRequiredService call " + e);
         }
     }
+    
+    public void testGetServices() {
+        try {
+            final Object svc = serviceLocator.getServices(ResourceResolver.class.getName(),null);
+            assertNull("getServices must return null",svc);
+        } catch(Exception e) {
+            fail("Unexpected Exception in getServices call " + e);
+        }
+    }
 }



Mime
View raw message