You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2009/06/17 17:26:11 UTC
svn commit: r785667 - in
/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall:
DirectoryWatcher.java FileInstall.java
Author: rickhall
Date: Wed Jun 17 15:26:11 2009
New Revision: 785667
URL: http://svn.apache.org/viewvc?rev=785667&view=rev
Log:
Removed extraneous whitespace after/before parenthesis.
Modified:
felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java?rev=785667&r1=785666&r2=785667&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java (original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java Wed Jun 17 15:26:11 2009
@@ -82,7 +82,7 @@
this.context = context;
poll = getLong(properties, POLL, poll);
debug = getLong(properties, DEBUG, -1);
- originatingFileName = ( String ) properties.get( FILENAME );
+ originatingFileName = (String) properties.get(FILENAME);
String dir = (String) properties.get(DIR);
if (dir == null)
@@ -99,7 +99,7 @@
if (!this.watchedDirectory.isDirectory())
{
- log( "Cannot watch " + watchedDirectory + " because it's not a directory", null);
+ log("Cannot watch " + watchedDirectory + " because it's not a directory", null);
throw new RuntimeException("Cannot start FileInstall to watch something that is not a directory");
}
@@ -293,36 +293,36 @@
Configuration getConfiguration(String pid, String factoryPid)
throws Exception
{
- Configuration oldConfiguration = findExistingConfiguration( pid, factoryPid );
- if ( oldConfiguration != null )
+ Configuration oldConfiguration = findExistingConfiguration(pid, factoryPid);
+ if (oldConfiguration != null)
{
- log( "Updating configuration from " + pid + ( factoryPid == null ? "" : "-" + factoryPid ) + ".cfg", null );
+ log("Updating configuration from " + pid + (factoryPid == null ? "" : "-" + factoryPid) + ".cfg", null);
return oldConfiguration;
}
else
{
- ConfigurationAdmin cm = ( ConfigurationAdmin ) FileInstall.cmTracker.getService();
+ ConfigurationAdmin cm = (ConfigurationAdmin) FileInstall.cmTracker.getService();
Configuration newConfiguration = null;
- if ( factoryPid != null )
+ if (factoryPid != null)
{
- newConfiguration = cm.createFactoryConfiguration( pid, null );
+ newConfiguration = cm.createFactoryConfiguration(pid, null);
}
else
{
- newConfiguration = cm.getConfiguration( pid, null );
+ newConfiguration = cm.getConfiguration(pid, null);
}
return newConfiguration;
}
}
- Configuration findExistingConfiguration( String pid, String factoryPid ) throws Exception
+ Configuration findExistingConfiguration(String pid, String factoryPid) throws Exception
{
String suffix = factoryPid == null ? ".cfg" : "-" + factoryPid + ".cfg";
- ConfigurationAdmin cm = ( ConfigurationAdmin ) FileInstall.cmTracker.getService();
+ ConfigurationAdmin cm = (ConfigurationAdmin) FileInstall.cmTracker.getService();
String filter = "(" + FILENAME + "=" + pid + suffix + ")";
- Configuration[] configurations = cm.listConfigurations( filter );
- if ( configurations != null && configurations.length > 0 )
+ Configuration[] configurations = cm.listConfigurations(filter);
+ if (configurations != null && configurations.length > 0)
{
return configurations[0];
}
@@ -725,9 +725,12 @@
// old can't be null because of the way we calculate deleted list.
Bundle bundle = context.getBundle(old.getBundleId());
- if ( bundle == null )
+ if (bundle == null)
{
- log( "Failed to uninstall bundle: " + jar.getPath() + " with id: "+old.getBundleId() + ". The bundle has already been uninstalled", null );
+ log("Failed to uninstall bundle: "
+ + jar.getPath() + " with id: "
+ + old.getBundleId()
+ + ". The bundle has already been uninstalled", null);
return null;
}
bundle.uninstall();
Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java?rev=785667&r1=785666&r2=785667&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java (original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java Wed Jun 17 15:26:11 2009
@@ -114,14 +114,14 @@
throws ConfigurationException
{
deleted(pid);
- performSubstitution( properties );
+ performSubstitution(properties);
DirectoryWatcher watcher = new DirectoryWatcher(properties, context);
watchers.put(pid, watcher);
watcher.start();
}
- private void performSubstitution( Dictionary properties )
+ private void performSubstitution(Dictionary properties)
{
for (Enumeration e = properties.keys(); e.hasMoreElements(); )
{