aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahrw...@apache.org
Subject svn commit: r1135256 - in /aries/trunk: blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/ util/src/main/java/org/apache/aries/util/ util/src/main/java/org/apache/aries/ut...
Date Mon, 13 Jun 2011 20:09:28 GMT
Author: mahrwald
Date: Mon Jun 13 20:09:27 2011
New Revision: 1135256

URL: http://svn.apache.org/viewvc?rev=1135256&view=rev
Log:
ARIES-582: Move SingleServiceTracker and remove BundleToClassLoaderAdapter API

Added:
    aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java
      - copied, changed from r1135182, aries/trunk/util/src/main/java/org/apache/aries/util/BundleToClassLoaderAdapter.java
    aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java
      - copied, changed from r1135182, aries/trunk/util/src/main/java/org/apache/aries/util/SingleServiceTracker.java
Removed:
    aries/trunk/util/src/main/java/org/apache/aries/util/BundleToClassLoaderAdapter.java
    aries/trunk/util/src/main/java/org/apache/aries/util/SingleServiceTracker.java
Modified:
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/Parser.java
    aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java
    aries/trunk/util/src/main/java/org/apache/aries/util/internal/DefaultWorker.java
    aries/trunk/util/src/main/java/org/apache/aries/util/manifest/packageinfo
    aries/trunk/util/src/main/java/org/apache/aries/util/packageinfo
    aries/trunk/util/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java?rev=1135256&r1=1135255&r2=1135256&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
(original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
Mon Jun 13 20:09:27 2011
@@ -40,9 +40,9 @@ import org.apache.aries.blueprint.utils.
 import org.apache.aries.blueprint.utils.HeaderParser.PathElement;
 import org.apache.aries.proxy.ProxyManager;
 import org.apache.aries.util.AriesFrameworkUtil;
-import org.apache.aries.util.SingleServiceTracker;
-import org.apache.aries.util.SingleServiceTracker.SingleServiceListener;
 import org.apache.aries.util.tracker.RecursiveBundleTracker;
+import org.apache.aries.util.tracker.SingleServiceTracker;
+import org.apache.aries.util.tracker.SingleServiceTracker.SingleServiceListener;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/Parser.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/Parser.java?rev=1135256&r1=1135255&r2=1135256&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/Parser.java
(original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/Parser.java
Mon Jun 13 20:09:27 2011
@@ -179,15 +179,14 @@ public class Parser {
     private ComponentDefinitionRegistry registry;
     private NamespaceHandlerRegistry.NamespaceHandlerSet handlers;
     private String idPrefix = "component-";
-    private Set<String> ids = new HashSet<String>();
+    private final Set<String> ids = new HashSet<String>();
     private int idCounter;
     private String defaultTimeout;
     private String defaultAvailability;
     private String defaultActivation;
     private Set<URI> namespaces;
 
-    public Parser() {
-    }
+    public Parser() {}
 
     public Parser(String idPrefix) {
         this.idPrefix = idPrefix;

Modified: aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java?rev=1135256&r1=1135255&r2=1135256&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java (original)
+++ aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java Mon Jun
13 20:09:27 2011
@@ -24,8 +24,8 @@ import javax.naming.spi.ObjectFactory;
 
 import org.apache.aries.proxy.ProxyManager;
 import org.apache.aries.util.AriesFrameworkUtil;
-import org.apache.aries.util.SingleServiceTracker;
-import org.apache.aries.util.SingleServiceTracker.SingleServiceListener;
+import org.apache.aries.util.tracker.SingleServiceTracker;
+import org.apache.aries.util.tracker.SingleServiceTracker.SingleServiceListener;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;

Copied: aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java
(from r1135182, aries/trunk/util/src/main/java/org/apache/aries/util/BundleToClassLoaderAdapter.java)
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java?p2=aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java&p1=aries/trunk/util/src/main/java/org/apache/aries/util/BundleToClassLoaderAdapter.java&r1=1135182&r2=1135256&rev=1135256&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/BundleToClassLoaderAdapter.java (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java
Mon Jun 13 20:09:27 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.aries.util;
+package org.apache.aries.util.internal;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -32,13 +32,9 @@ import java.util.Enumeration;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleReference;
 
-/**
- * @deprecated Please use AriesFrameworkUtil.getClassLoader to get a class loader for a bundle
instead of this method
- */
-@Deprecated
 public class BundleToClassLoaderAdapter extends ClassLoader implements BundleReference
 {
-  private Bundle b;
+  private final Bundle b;
 
   public BundleToClassLoaderAdapter(Bundle bundle)
   {
@@ -49,7 +45,8 @@ public class BundleToClassLoaderAdapter 
   public URL getResource(final String name)
   {
     return AccessController.doPrivileged(new PrivilegedAction<URL>() {
-      public URL run()
+      @Override
+	public URL run()
       {
         return b.getResource(name);
       }
@@ -79,7 +76,8 @@ public class BundleToClassLoaderAdapter 
     Enumeration<URL> urls;
     try {
       urls = AccessController.doPrivileged(new PrivilegedExceptionAction<Enumeration<URL>>()
{
-        @SuppressWarnings("unchecked")
+        @Override
+		@SuppressWarnings("unchecked")
         public Enumeration<URL> run() throws IOException
         {
           return b.getResources(name);
@@ -105,7 +103,8 @@ public class BundleToClassLoaderAdapter 
   {
     try {
       return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>()
{
-        public Class<?> run() throws ClassNotFoundException
+        @Override
+		public Class<?> run() throws ClassNotFoundException
         {
           return b.loadClass(name);
         }
@@ -120,6 +119,7 @@ public class BundleToClassLoaderAdapter 
     }
   }
 
+  @Override
   public Bundle getBundle()
   {
     return b;

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/internal/DefaultWorker.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/internal/DefaultWorker.java?rev=1135256&r1=1135255&r2=1135256&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/internal/DefaultWorker.java (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/internal/DefaultWorker.java Mon Jun
13 20:09:27 2011
@@ -23,7 +23,6 @@ import java.security.PrivilegedAction;
 import java.util.IdentityHashMap;
 import java.util.Map;
 
-import org.apache.aries.util.BundleToClassLoaderAdapter;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/manifest/packageinfo
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/manifest/packageinfo?rev=1135256&r1=1135255&r2=1135256&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/manifest/packageinfo (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/manifest/packageinfo Mon Jun 13 20:09:27
2011
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-version 0.1
+version 0.2

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/packageinfo
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/packageinfo?rev=1135256&r1=1135255&r2=1135256&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/packageinfo (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/packageinfo Mon Jun 13 20:09:27 2011
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-version 0.3.1
+version 0.4

Copied: aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java
(from r1135182, aries/trunk/util/src/main/java/org/apache/aries/util/SingleServiceTracker.java)
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java?p2=aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java&p1=aries/trunk/util/src/main/java/org/apache/aries/util/SingleServiceTracker.java&r1=1135182&r2=1135256&rev=1135256&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/SingleServiceTracker.java (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java
Mon Jun 13 20:09:27 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.aries.util;
+package org.apache.aries.util.tracker;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;

Modified: aries/trunk/util/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java?rev=1135256&r1=1135255&r2=1135256&view=diff
==============================================================================
--- aries/trunk/util/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java (original)
+++ aries/trunk/util/src/test/java/org/apache/aries/util/SingleServiceTrackerTest.java Mon
Jun 13 20:09:27 2011
@@ -21,7 +21,8 @@ package org.apache.aries.util;
 import org.apache.aries.mocks.BundleContextMock;
 import org.apache.aries.unittest.mocks.MethodCall;
 import org.apache.aries.unittest.mocks.Skeleton;
-import org.apache.aries.util.SingleServiceTracker.SingleServiceListener;
+import org.apache.aries.util.tracker.SingleServiceTracker;
+import org.apache.aries.util.tracker.SingleServiceTracker.SingleServiceListener;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;



Mime
View raw message