sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r653708 - in /incubator/sling/trunk/commons/testing: pom.xml src/main/java/org/apache/sling/commons/testing/osgi/MockComponentContext.java
Date Tue, 06 May 2008 08:34:49 GMT
Author: cziegeler
Date: Tue May  6 01:34:49 2008
New Revision: 653708

URL: http://svn.apache.org/viewvc?rev=653708&view=rev
Log:
Remove cyclic dependency.

Modified:
    incubator/sling/trunk/commons/testing/pom.xml
    incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/osgi/MockComponentContext.java

Modified: incubator/sling/trunk/commons/testing/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/commons/testing/pom.xml?rev=653708&r1=653707&r2=653708&view=diff
==============================================================================
--- incubator/sling/trunk/commons/testing/pom.xml (original)
+++ incubator/sling/trunk/commons/testing/pom.xml Tue May  6 01:34:49 2008
@@ -54,11 +54,6 @@
             <artifactId>org.apache.sling.api</artifactId>
             <version>2.0.0-incubator-SNAPSHOT</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.core</artifactId>
-            <version>2.0.0-incubator-SNAPSHOT</version>
-        </dependency>
 
         <dependency>
             <groupId>org.apache.sling</groupId>

Modified: incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/osgi/MockComponentContext.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/osgi/MockComponentContext.java?rev=653708&r1=653707&r2=653708&view=diff
==============================================================================
--- incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/osgi/MockComponentContext.java
(original)
+++ incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/osgi/MockComponentContext.java
Tue May  6 01:34:49 2008
@@ -23,7 +23,6 @@
 
 import javax.servlet.Servlet;
 
-import org.apache.sling.core.CoreConstants;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -31,6 +30,7 @@
 import org.osgi.service.component.ComponentInstance;
 
 public class MockComponentContext implements ComponentContext {
+
     private Dictionary properties = new Properties();
 
     private MockBundleContext mockBundleContext;
@@ -53,7 +53,8 @@
     }
 
     public Object locateService(String name, ServiceReference reference) {
-        String referenceName = (String) reference.getProperty(CoreConstants.SLING_SERLVET_NAME);
+        // the constant is from Sling Core, but we don't want to have a dep just because
of this
+        String referenceName = (String) reference.getProperty("sling.core.servletName");
         if (referenceName != null && referenceName.equals(name)) {
             return this.servlet;
         }



Mime
View raw message