Removed extraneous whitespace after/before parenthesis.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@785667 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
index e4bb867..dcf6c06 100644
--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
@@ -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();
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
index 8226778..4713f3c 100644
--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
@@ -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(); )
{