[jboss-osgi-commits] JBoss-OSGI SVN: r93011 - in projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src: main/java/org/jboss/osgi/plugins/util and 2 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Sun Aug 30 14:32:53 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-08-30 14:32:52 -0400 (Sun, 30 Aug 2009)
New Revision: 93011
Removed:
projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/simple/
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java
projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/util/CaseInsensitiveDictionary.java
projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/GetUnGetServiceUnitTestCase.java
projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/ServiceFactoryUnitTestCase.java
Log:
Modified: projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java 2009-08-30 16:29:22 UTC (rev 93010)
+++ projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java 2009-08-30 18:32:52 UTC (rev 93011)
@@ -115,6 +115,7 @@
this.bundleState = bundleState;
this.clazzes = clazzes;
this.serviceOrFactory = service;
+
if (service instanceof ServiceFactory == false)
checkObjClass(service);
Modified: projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/util/CaseInsensitiveDictionary.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/util/CaseInsensitiveDictionary.java 2009-08-30 16:29:22 UTC (rev 93010)
+++ projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/main/java/org/jboss/osgi/plugins/util/CaseInsensitiveDictionary.java 2009-08-30 18:32:52 UTC (rev 93011)
@@ -53,6 +53,7 @@
{
if (delegate == null)
throw new IllegalArgumentException("Null delegaqte");
+
this.delegate = new Hashtable<String, Object>(delegate.size());
this.originalKeys = Collections.synchronizedSet(new HashSet<String>());
Enumeration<String> e = delegate.keys();
@@ -61,6 +62,7 @@
String key = e.nextElement();
if (get(key) != null)
throw new IllegalArgumentException("Properties contain duplicates with varying case for key=" + key + " : " + delegate);
+
this.delegate.put(key.toLowerCase(), delegate.get(key));
originalKeys.add(key);
}
Modified: projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/GetUnGetServiceUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/GetUnGetServiceUnitTestCase.java 2009-08-30 16:29:22 UTC (rev 93010)
+++ projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/GetUnGetServiceUnitTestCase.java 2009-08-30 18:32:52 UTC (rev 93011)
@@ -25,7 +25,6 @@
import org.jboss.test.osgi.OSGiTestCase;
import org.jboss.test.osgi.service.support.BrokenServiceFactory;
-import org.jboss.test.osgi.service.support.SimpleServiceFactory;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkEvent;
Modified: projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/ServiceFactoryUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/ServiceFactoryUnitTestCase.java 2009-08-30 16:29:22 UTC (rev 93010)
+++ projects/jboss-osgi/projects/runtime/microcontainer/branches/tdiesler/src/test/java/org/jboss/test/osgi/service/test/ServiceFactoryUnitTestCase.java 2009-08-30 18:32:52 UTC (rev 93011)
@@ -73,16 +73,6 @@
assertEquals(bundleA.getSymbolicName(), serviceFactory.getBundle.getSymbolicName());
assertEquals(1, serviceFactory.getCount);
- sregA = contextA.registerService(OBJCLASSES, serviceFactory, null);
- srefA = sregA.getReference();
- actual = contextA.getService(srefA);
- assertEquals(contextA, actual);
- assertInstanceOf(serviceFactory.getBundle, OSGiBundleWrapper.class);
- assertEquals(bundleA.getSymbolicName(), serviceFactory.getBundle.getSymbolicName());
-
- System.out.println("[JBOSGI-144] Framework does not handle ServiceFactory provided services properly");
- //assertEquals(1, serviceFactory.getCount);
-
Bundle bundleB = addBundle("/bundles/simple/", "simple-bundle2");
try
{
@@ -95,9 +85,8 @@
assertEquals(contextA, actual);
assertInstanceOf(serviceFactory.getBundle, OSGiBundleWrapper.class);
- System.out.println("[JBOSGI-144] Framework does not handle ServiceFactory provided services properly");
- //assertEquals(bundleB.getSymbolicName(), serviceFactory.getBundle.getSymbolicName());
- //assertEquals(2, serviceFactory.getCount);
+ assertEquals(bundleB.getSymbolicName(), serviceFactory.getBundle.getSymbolicName());
+ assertEquals(2, serviceFactory.getCount);
}
finally
{
More information about the jboss-osgi-commits
mailing list