directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r280070 - in /directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl: ConfigurationDispatcher.java PluginManager.java Update.java UpdateQueue.java
Date Sun, 11 Sep 2005 04:32:56 GMT
Author: erodriguez
Date: Sat Sep 10 21:32:53 2005
New Revision: 280070

URL: http://svn.apache.org/viewcvs?rev=280070&view=rev
Log:
Minor code convention updates.

Modified:
    directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/ConfigurationDispatcher.java
    directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/PluginManager.java
    directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/Update.java
    directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/UpdateQueue.java

Modified: directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/ConfigurationDispatcher.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/ConfigurationDispatcher.java?rev=280070&r1=280069&r2=280070&view=diff
==============================================================================
--- directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/ConfigurationDispatcher.java
(original)
+++ directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/ConfigurationDispatcher.java
Sat Sep 10 21:32:53 2005
@@ -17,7 +17,8 @@
 
 package org.apache.configuration.impl;
 
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.configuration.ConfigurationFactory;
 import org.osgi.framework.ServiceReference;
@@ -35,19 +36,18 @@
     private static final Logger log = LoggerFactory.getLogger( ConfigurationDispatcher.class
);
 
     /**
-     * The PluginManager to use.
+     * One queue per target service.
      */
-    private PluginManager pm;
+    private Map serviceReferenceToTargetService = new HashMap();
+    private Map targetServiceToQueue = new HashMap();
 
     /**
-     * One queue per target service.
+     * The PluginManager to use.
      */
-    private Hashtable serviceReferenceToTargetService = new Hashtable();
-
-    private Hashtable targetServiceToQueue = new Hashtable();
+    private PluginManager pm;
 
     /**
-     * Construct a ConfigurationDispatcher given a ConfigurationServicesTracker.
+     * Construct a ConfigurationDispatcher
      * 
      * @param pm The PluginManager to use.
      */
@@ -107,7 +107,7 @@
                 log.error( "Missing target service for a ServiceReference in removeQueueFor(ServiceReference)"
);
             }
             else
-                if ( !serviceReferenceToTargetService.contains( targetService ) )
+                if ( !serviceReferenceToTargetService.containsValue( targetService ) )
                 {
                     UpdateQueue uq = (UpdateQueue) targetServiceToQueue.remove( targetService
);
 

Modified: directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/PluginManager.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/PluginManager.java?rev=280070&r1=280069&r2=280070&view=diff
==============================================================================
--- directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/PluginManager.java
(original)
+++ directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/PluginManager.java
Sat Sep 10 21:32:53 2005
@@ -43,22 +43,22 @@
     /**
      * Sorted Vector of ServiceReferences to ConfigurationPlugins.
      */
-    Vector preModificationPlugins = new Vector();
+    private Vector preModificationPlugins = new Vector();
 
     /**
      * Sorted Vector of ServiceReferences to ConfigurationPlugins.
      */
-    Vector modifyingPlugins = new Vector();
+    private Vector modifyingPlugins = new Vector();
 
     /**
      * Sorted Vector of ServiceReferences to ConfigurationPlugins.
      */
-    Vector postModificationPlugins = new Vector();
+    private Vector postModificationPlugins = new Vector();
 
     /**
      * Hashtable mapping a ServiceReference to its ranking (Integer).
      */
-    Hashtable rankings = new Hashtable();
+    private Hashtable rankings = new Hashtable();
 
     /**
      * Handle ConfigurationPlugin ServiceEvents.

Modified: directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/Update.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/Update.java?rev=280070&r1=280069&r2=280070&view=diff
==============================================================================
--- directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/Update.java
(original)
+++ directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/Update.java
Sat Sep 10 21:32:53 2005
@@ -25,11 +25,11 @@
 
 final class Update
 {
-    final ServiceReference sr;
-    final String pid;
-    final String factoryPid;
-    final ConfigurationDictionary configuration;
-    ConfigurationDictionary processedConfiguration = null;
+    private ServiceReference sr;
+    private String pid;
+    private String factoryPid;
+    private ConfigurationDictionary configuration;
+    private ConfigurationDictionary processedConfiguration = null;
 
     public Update( ServiceReference sr, String pid, String factoryPid, ConfigurationDictionary
configuration )
     {
@@ -105,5 +105,10 @@
         }
 
         return ConfigurationFactory.bc.getService( sr );
+    }
+
+    public String toString()
+    {
+        return pid;
     }
 }

Modified: directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/UpdateQueue.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/UpdateQueue.java?rev=280070&r1=280069&r2=280070&view=diff
==============================================================================
--- directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/UpdateQueue.java
(original)
+++ directory/sandbox/trunk/osgi-spec/trunk/configuration/src/main/java/org/apache/configuration/impl/UpdateQueue.java
Sat Sep 10 21:32:53 2005
@@ -105,11 +105,11 @@
             }
             catch ( ConfigurationException ce )
             {
-                log.error( "Error in configuration for " + update.pid, ce );
+                log.error( "Error in configuration for " + update, ce );
             }
             catch ( Exception e )
             {
-                log.error( "Error while updating " + update.pid, e );
+                log.error( "Error while updating " + update, e );
             }
         }
     }
@@ -128,7 +128,7 @@
 
         if ( log.isDebugEnabled() )
         {
-            log.info( "Adding update for " + update.pid + " to queue" );
+            log.info( "Adding update for " + update + " to queue" );
         }
 
         queue.addElement( update );



Mime
View raw message