You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2007/08/15 13:17:42 UTC

svn commit: r566104 - in /felix/trunk: configadmin/src/main/java/org/apache/felix/cm/impl/ shell/src/main/java/org/apache/felix/shell/impl/

Author: cziegeler
Date: Wed Aug 15 04:17:41 2007
New Revision: 566104

URL: http://svn.apache.org/viewvc?view=rev&rev=566104
Log:
Revert unintentional code formatting

Modified:
    felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationAdminImpl.java
    felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java
    felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/Factory.java
    felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/RankingComparator.java
    felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/PsCommandImpl.java

Modified: felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationAdminImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationAdminImpl.java?view=diff&rev=566104&r1=566103&r2=566104
==============================================================================
--- felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationAdminImpl.java (original)
+++ felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationAdminImpl.java Wed Aug 15 04:17:41 2007
@@ -55,14 +55,14 @@
 
     void dispose()
     {
-        this.bundle = null;
-        this.configurationManager = null;
+        bundle = null;
+        configurationManager = null;
     }
 
 
     Bundle getBundle()
     {
-        return this.bundle;
+        return bundle;
     }
 
 
@@ -73,7 +73,7 @@
      */
     public Configuration createFactoryConfiguration( String factoryPid ) throws IOException
     {
-        return this.wrap( this.configurationManager.createFactoryConfiguration( this, factoryPid ) );
+        return this.wrap( configurationManager.createFactoryConfiguration( this, factoryPid ) );
     }
 
 
@@ -84,7 +84,7 @@
     {
         this.checkPermission();
 
-        return this.wrap( this.configurationManager.createFactoryConfiguration( factoryPid, location ) );
+        return this.wrap( configurationManager.createFactoryConfiguration( factoryPid, location ) );
     }
 
 
@@ -93,7 +93,7 @@
      */
     public Configuration getConfiguration( String pid ) throws IOException
     {
-        ConfigurationImpl config = this.configurationManager.getConfiguration( pid );
+        ConfigurationImpl config = configurationManager.getConfiguration( pid );
 
         if ( config.getBundleLocation() == null )
         {
@@ -115,7 +115,7 @@
     {
         this.checkPermission();
 
-        return this.wrap( this.configurationManager.getConfiguration( pid, location ) );
+        return this.wrap( configurationManager.getConfiguration( pid, location ) );
     }
 
 
@@ -124,7 +124,7 @@
      */
     public Configuration[] listConfigurations( String filter ) throws IOException, InvalidSyntaxException
     {
-        ConfigurationImpl ci[] = this.configurationManager.listConfigurations( this, filter );
+        ConfigurationImpl ci[] = configurationManager.listConfigurations( this, filter );
         if ( ci == null )
         {
             return null;
@@ -155,7 +155,7 @@
      */
     boolean hasPermission()
     {
-        return this.bundle.hasPermission( new ConfigurationPermission( "*", ConfigurationPermission.CONFIGURE ) );
+        return bundle.hasPermission( new ConfigurationPermission( "*", ConfigurationPermission.CONFIGURE ) );
     }
 
 
@@ -171,7 +171,7 @@
     {
         if ( !this.hasPermission() )
         {
-            throw new SecurityException( "Bundle " + this.bundle.getSymbolicName()
+            throw new SecurityException( "Bundle " + bundle.getSymbolicName()
                 + " not permitted for Configuration Tasks" );
         }
     }

Modified: felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java?view=diff&rev=566104&r1=566103&r2=566104
==============================================================================
--- felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java (original)
+++ felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationImpl.java Wed Aug 15 04:17:41 2007
@@ -29,8 +29,9 @@
 import org.osgi.service.cm.Configuration;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.log.LogService;
-implementation of the Configuration
- * Admin Service Specification <i>Configuration object</i> (section 104.4).
+
+/**
+-* The <code>ConfigurationImpl</code> is the implementation of the Configuration * Admin Service Specification <i>Configuration object</i> (section 104.4).
  *
  * @author fmeschbe
  */
@@ -93,11 +94,11 @@
         this.configurationManager = configurationManager;
         this.persistenceManager = persistenceManager;
 
-        this.pid = ( String ) properties.remove( Constants.SERVICE_PID );
-        this.factoryPID = ( String ) properties.remove( ConfigurationAdmin.SERVICE_FACTORYPID );
-        this.bundleLocation = ( String ) properties.remove( ConfigurationAdmin.SERVICE_BUNDLELOCATION );
+        pid = ( String ) properties.remove( Constants.SERVICE_PID );
+        factoryPID = ( String ) properties.remove( ConfigurationAdmin.SERVICE_FACTORYPID );
+        bundleLocation = ( String ) properties.remove( ConfigurationAdmin.SERVICE_BUNDLELOCATION );
 
-        this.configure( properties );
+        configure( properties );
     }
 
 
@@ -107,7 +108,7 @@
         this.configurationManager = configurationManager;
         this.persistenceManager = persistenceManager;
         this.pid = pid;
-        this.factoryPID = factoryPid;
+        factoryPID = factoryPid;
     }
 
 
@@ -118,10 +119,10 @@
     {
         if ( !this.isDeleted() )
         {
-            this.persistenceManager.delete( this.pid );
-            this.persistenceManager = null;
+            persistenceManager.delete( pid );
+            persistenceManager = null;
 
-            this.configurationManager.deleted( this );
+            configurationManager.deleted( this );
         }
     }
 
@@ -131,7 +132,7 @@
      */
     public String getPid()
     {
-        return this.pid;
+        return pid;
     }
 
 
@@ -140,7 +141,7 @@
      */
     public String getFactoryPid()
     {
-        return this.factoryPID;
+        return factoryPID;
     }
 
 
@@ -149,7 +150,7 @@
      */
     public String getBundleLocation()
     {
-        return this.bundleLocation;
+        return bundleLocation;
     }
 
 
@@ -159,15 +160,15 @@
     public Dictionary getProperties()
     {
         // no properties yet
-        if ( this.properties == null )
+        if ( properties == null )
         {
             return null;
         }
 
-        CaseInsensitiveDictionary props = new CaseInsensitiveDictionary( this.properties );
+        CaseInsensitiveDictionary props = new CaseInsensitiveDictionary( properties );
 
         // fix special properties (pid, factory PID, bundle location)
-        this.setAutoProperties( props, false );
+        setAutoProperties( props, false );
 
         return props;
     }
@@ -189,7 +190,7 @@
             }
             catch ( IOException ioe )
             {
-                this.configurationManager.log( LogService.LOG_ERROR, "Persisting new bundle location failed", ioe );
+                configurationManager.log( LogService.LOG_ERROR, "Persisting new bundle location failed", ioe );
             }
         }
     }
@@ -203,19 +204,19 @@
         if ( !this.isDeleted() )
         {
             // read configuration from persistence (again)
-            Dictionary properties = this.persistenceManager.load( this.pid );
+            Dictionary properties = persistenceManager.load( pid );
 
             // ensure serviceReference pid
             String servicePid = ( String ) properties.get( Constants.SERVICE_PID );
-            if ( servicePid != null && !this.pid.equals( servicePid ) )
+            if ( servicePid != null && !pid.equals( servicePid ) )
             {
-                throw new IOException( "PID of configuration file does match requested PID; expected " + this.pid + ", got "
+                throw new IOException( "PID of configuration file does match requested PID; expected " + pid + ", got "
                     + servicePid );
             }
 
             this.configure( properties );
 
-            this.configurationManager.updated( this );
+            configurationManager.updated( this );
         }
     }
 
@@ -231,11 +232,11 @@
 
             this.setAutoProperties( newProperties, true );
 
-            this.persistenceManager.store( this.pid, newProperties );
+            persistenceManager.store( pid, newProperties );
 
             this.configure( newProperties );
 
-            this.configurationManager.updated( this );
+            configurationManager.updated( this );
         }
     }
 
@@ -251,7 +252,7 @@
 
         if ( obj instanceof Configuration )
         {
-            return this.pid.equals( ( ( Configuration ) obj ).getPid() );
+            return pid.equals( ( ( Configuration ) obj ).getPid() );
         }
 
         return false;
@@ -260,13 +261,13 @@
 
     public int hashCode()
     {
-        return this.pid.hashCode();
+        return pid.hashCode();
     }
 
 
     public String toString()
     {
-        return "Configuration PID=" + this.pid + ", factoryPID=" + this.factoryPID + ", bundleLocation=" + this.bundleLocation;
+        return "Configuration PID=" + pid + ", factoryPID=" + factoryPID + ", bundleLocation=" + bundleLocation;
     }
 
 
@@ -280,13 +281,13 @@
 
     ServiceReference getServiceReference()
     {
-        return this.serviceReference;
+        return serviceReference;
     }
 
 
     void store() throws IOException
     {
-        Dictionary props = this.getProperties();
+        Dictionary props = getProperties();
 
         // if this is a new configuration, we just use an empty Dictionary
         if ( props == null )
@@ -302,20 +303,20 @@
         }
 
         // only store now, if this is not a new configuration
-        this.persistenceManager.store( this.pid, props );
+        persistenceManager.store( pid, props );
     }
 
 
     boolean isDeleted()
     {
-        if ( this.persistenceManager != null )
+        if ( persistenceManager != null )
         {
-            if ( this.properties == null || this.persistenceManager.exists( this.pid ) )
+            if ( properties == null || persistenceManager.exists( pid ) )
             {
                 return false;
             }
 
-            this.persistenceManager = null;
+            persistenceManager = null;
         }
 
         return true;
@@ -330,11 +331,11 @@
         // ensure CaseInsensitiveDictionary
         if ( properties instanceof CaseInsensitiveDictionary )
         {
-            this.properties = ( CaseInsensitiveDictionary ) properties;
+            this.properties = (CaseInsensitiveDictionary)properties;
         }
         else
         {
-            this.properties = new CaseInsensitiveDictionary( properties );
+            properties = new CaseInsensitiveDictionary( properties );
         }
     }
 
@@ -342,8 +343,8 @@
     void setAutoProperties( Dictionary properties, boolean withBundleLocation )
     {
         // set pid and factory pid in the properties
-        this.replaceProperty( properties, Constants.SERVICE_PID, this.pid );
-        this.replaceProperty( properties, ConfigurationAdmin.SERVICE_FACTORYPID, this.factoryPID );
+        this.replaceProperty( properties, Constants.SERVICE_PID, pid );
+        this.replaceProperty( properties, ConfigurationAdmin.SERVICE_FACTORYPID, factoryPID );
 
         // bundle location is not set here
         if ( withBundleLocation )

Modified: felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/Factory.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/Factory.java?view=diff&rev=566104&r1=566103&r2=566104
==============================================================================
--- felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/Factory.java (original)
+++ felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/Factory.java Wed Aug 15 04:17:41 2007
@@ -91,7 +91,7 @@
     {
         this.persistenceManager = persistenceManager;
         this.factoryPid = factoryPid;
-        this.pids = new HashSet();
+        pids = new HashSet();
     }
 
 
@@ -100,7 +100,7 @@
         this( persistenceManager, factoryPid );
 
         // set bundle location
-        this.bundleLocation = ( String ) props.get( ConfigurationAdmin.SERVICE_BUNDLELOCATION );
+        bundleLocation = ( String ) props.get( ConfigurationAdmin.SERVICE_BUNDLELOCATION );
 
         // set pids
         String[] pidList = ( String[] ) props.get( FACTORY_PID_LIST );
@@ -108,7 +108,7 @@
         {
             for ( int i = 0; i < pidList.length; i++ )
             {
-                this.pids.add( pidList[i] );
+                pids.add( pidList[i] );
             }
         }
     }
@@ -116,19 +116,19 @@
 
     PersistenceManager getPersistenceManager()
     {
-        return this.persistenceManager;
+        return persistenceManager;
     }
 
 
     String getFactoryPid()
     {
-        return this.factoryPid;
+        return factoryPid;
     }
 
 
     String getBundleLocation()
     {
-        return this.bundleLocation;
+        return bundleLocation;
     }
 
 
@@ -137,25 +137,25 @@
         this.bundleLocation = bundleLocation;
 
         // 104.15.2.8 The bundle location will be set persistently
-        this.storeSilently();
+        storeSilently();
     }
 
 
     Set getPIDs()
     {
-        return new HashSet( this.pids );
+        return new HashSet( pids );
     }
 
 
     boolean addPID( String pid )
     {
-        return this.pids.add( pid );
+        return pids.add( pid );
     }
 
 
     boolean removePID( String pid )
     {
-        return this.pids.remove( pid );
+        return pids.remove( pid );
     }
 
 
@@ -163,25 +163,25 @@
     {
         Hashtable props = new Hashtable();
 
-        if ( this.bundleLocation != null )
+        if ( bundleLocation != null )
         {
             props.put( ConfigurationAdmin.SERVICE_BUNDLELOCATION, this.getBundleLocation() );
         }
 
-        if ( !this.pids.isEmpty() )
+        if ( !pids.isEmpty() )
         {
-            props.put( FACTORY_PID_LIST, this.pids.toArray( new String[this.pids.size()] ) );
+            props.put( FACTORY_PID_LIST, pids.toArray( new String[pids.size()] ) );
         }
 
         String id = factoryPidToIdentifier( this.getFactoryPid() );
         if ( props.isEmpty() )
         {
-            this.persistenceManager.delete( id );
+            persistenceManager.delete( id );
         }
         else
         {
             props.put( FACTORY_PID, this.getFactoryPid() );
-            this.persistenceManager.store( id, props );
+            persistenceManager.store( id, props );
         }
     }
 

Modified: felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/RankingComparator.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/RankingComparator.java?view=diff&rev=566104&r1=566103&r2=566104
==============================================================================
--- felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/RankingComparator.java (original)
+++ felix/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/RankingComparator.java Wed Aug 15 04:17:41 2007
@@ -57,9 +57,9 @@
             return 0;
         }
 
-        long rank1 = this.getLong( ( ServiceReference ) obj1, this.rankProperty );
-        long rank2 = this.getLong( ( ServiceReference ) obj2, this.rankProperty );
-        boolean order = this.naturalOrder;
+        long rank1 = this.getLong( ( ServiceReference ) obj1, rankProperty );
+        long rank2 = this.getLong( ( ServiceReference ) obj2, rankProperty );
+        boolean order = naturalOrder;
 
         // use service id, if rankings are equal
         if ( rank1 == rank2 )

Modified: felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/PsCommandImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/PsCommandImpl.java?view=diff&rev=566104&r1=566103&r2=566104
==============================================================================
--- felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/PsCommandImpl.java (original)
+++ felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/PsCommandImpl.java Wed Aug 15 04:17:41 2007
@@ -34,7 +34,7 @@
 
     public PsCommandImpl(BundleContext context)
     {
-        this.m_context = context;
+        m_context = context;
     }
 
     public String getName()
@@ -55,12 +55,12 @@
     public void execute(String s, PrintStream out, PrintStream err)
     {
         // Get start level service.
-        ServiceReference ref = this.m_context.getServiceReference(
+        ServiceReference ref = m_context.getServiceReference(
             org.osgi.service.startlevel.StartLevel.class.getName());
         StartLevel sl = null;
         if (ref != null)
         {
-            sl = (StartLevel) this.m_context.getService(ref);
+            sl = (StartLevel) m_context.getService(ref);
         }
 
         if (sl == null)
@@ -97,7 +97,7 @@
                 }
             }
         }
-        Bundle[] bundles = this.m_context.getBundles();
+        Bundle[] bundles = m_context.getBundles();
         if (bundles != null)
         {
             // Display active start level.