Formatting and clean up of some files
diff --git a/org.eclipse.virgo.nano.deployer.api/src/main/java/org/eclipse/virgo/nano/deployer/api/core/ApplicationDeployer.java b/org.eclipse.virgo.nano.deployer.api/src/main/java/org/eclipse/virgo/nano/deployer/api/core/ApplicationDeployer.java
index 64cedd9..86a74d3 100644
--- a/org.eclipse.virgo.nano.deployer.api/src/main/java/org/eclipse/virgo/nano/deployer/api/core/ApplicationDeployer.java
+++ b/org.eclipse.virgo.nano.deployer.api/src/main/java/org/eclipse/virgo/nano/deployer/api/core/ApplicationDeployer.java
@@ -39,8 +39,7 @@
      * @throws DeploymentException if installation fails.
      */
     DeploymentIdentity install(URI uri, DeploymentOptions options) throws DeploymentException;
-    
-    
+
     /**
      * Deploys the artifact are the supplied <code>location</code>. The supplied <code>options</code> govern how the
      * installed artifact is handled by the deployed, e.g. if it is recovered and re-installed upon warm restart.
@@ -68,19 +67,18 @@
     DeploymentIdentity deploy(URI uri) throws DeploymentException;
 
     /**
-     * Deploys a bunch of deployable artifacts altogether 
-     * so that if there are dependencies in between,they are resolved successfully.
-     * Note that this may not always be the case if they are deployed one by one 
-     * through some of the other deploy methods.
-     * Therefore the method is convenient to solve dependency resolution issues   
-     * that are caused due to the order in which deployable bundles are deployed.   
+     * Deploys a bunch of deployable artifacts altogether so that if there are dependencies in between,they are resolved
+     * successfully. Note that this may not always be the case if they are deployed one by one through some of the other
+     * deploy methods. Therefore the method is convenient to solve dependency resolution issues that are caused due to
+     * the order in which deployable bundles are deployed.
+     * 
      * @param uris the location paths of the deployable artifacts
      * @param options the options for this deployment
-     * @return an array of the successfully deployed applications's {@link DeploymentIdentity}. 
+     * @return an array of the successfully deployed applications's {@link DeploymentIdentity}.
      * @throws DeploymentException
      */
-    DeploymentIdentity[] bulkDeploy (List<URI> uris, DeploymentOptions options) throws DeploymentException;
-    
+    DeploymentIdentity[] bulkDeploy(List<URI> uris, DeploymentOptions options) throws DeploymentException;
+
     /**
      * Deploy an application which may be either an OSGi application or a legacy application such as a WAR. This is used
      * by admin. and hot deployment.
@@ -121,7 +119,6 @@
      * @throws DeploymentException
      */
     DeploymentIdentity deploy(String type, String name, Version version, DeploymentOptions options) throws DeploymentException;
-    
 
     /**
      * Undeploy an application with a given symbolic name and version.
@@ -134,6 +131,7 @@
      * @throws DeploymentException
      * @deprecated in favour of the undeploy(String, String, String) which takes artifact type as first parameter
      */
+    @Deprecated
     void undeploy(String applicationSymbolicName, String version) throws DeploymentException;
 
     /**
diff --git a/org.eclipse.virgo.nano.deployer.hot/src/main/java/org/eclipse/virgo/nano/deployer/hot/HotDeployerFileSystemListener.java b/org.eclipse.virgo.nano.deployer.hot/src/main/java/org/eclipse/virgo/nano/deployer/hot/HotDeployerFileSystemListener.java
index 34d70a2..016a4c3 100644
--- a/org.eclipse.virgo.nano.deployer.hot/src/main/java/org/eclipse/virgo/nano/deployer/hot/HotDeployerFileSystemListener.java
+++ b/org.eclipse.virgo.nano.deployer.hot/src/main/java/org/eclipse/virgo/nano/deployer/hot/HotDeployerFileSystemListener.java
@@ -1,3 +1,4 @@
+
 package org.eclipse.virgo.nano.deployer.hot;
 
 import java.io.File;
@@ -6,22 +7,19 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
+import org.eclipse.virgo.medic.eventlog.EventLogger;
+import org.eclipse.virgo.medic.eventlog.LogEvent;
 import org.eclipse.virgo.nano.deployer.api.core.ApplicationDeployer;
 import org.eclipse.virgo.nano.deployer.api.core.DeploymentException;
 import org.eclipse.virgo.nano.deployer.api.core.DeploymentIdentity;
 import org.eclipse.virgo.nano.deployer.api.core.DeploymentOptions;
 import org.eclipse.virgo.nano.deployer.api.core.FatalDeploymentException;
 import org.eclipse.virgo.nano.serviceability.NonNull;
-import org.eclipse.virgo.medic.eventlog.EventLogger;
-import org.eclipse.virgo.medic.eventlog.LogEvent;
 import org.eclipse.virgo.util.io.FileSystemEvent;
 import org.eclipse.virgo.util.io.FileSystemListener;
 import org.eclipse.virgo.util.io.PathReference;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * {@link FileSystemListener} that monitors a pickup directory for file system events. When a file is created it is
@@ -61,21 +59,22 @@
      * 
      * Reacts to changes in the pickup directory and calls the {@link ApplicationDeployer} as appropriate.
      */
+    @Override
     public void onChange(String path, FileSystemEvent event) {
         String fileName = new PathReference(path).getName();
         this.eventLogger.log(HotDeployerLogEvents.HOT_DEPLOY_PROCESSING_FILE, event, fileName);
         try {
             if (event == FileSystemEvent.CREATED) {
-                logger.info("ApplicationDeploying path '{}'.", path);
+                this.logger.info("ApplicationDeploying path '{}'.", path);
                 deploy(path);
             } else if (event == FileSystemEvent.MODIFIED) {
-                logger.info("Redeploying path '{}'.", path);
+                this.logger.info("Redeploying path '{}'.", path);
                 deploy(path);
             } else if (event == FileSystemEvent.DELETED) {
-                logger.info("ApplicationUndeploying path '{}'.", path);
+                this.logger.info("ApplicationUndeploying path '{}'.", path);
                 undeploy(path);
             } else if (event == FileSystemEvent.INITIAL) {
-                logger.info("ApplicationConditionallyDeploying path '{}'.", path);
+                this.logger.info("ApplicationConditionallyDeploying path '{}'.", path);
                 deployIfNotDeployed(path, fileName);
             }
         } catch (Exception ex) {
@@ -83,59 +82,56 @@
             determineFailureAndLogMessage(event, fileName, ex);
         }
     }
-    
-    
+
     /**
      * {@inheritDoc}
      * 
      * Reacts to initial event in the pickup directory and calls the bulk deploy method in {@link ApplicationDeployer}.
      */
     public void onInitialEvent(List<String> paths) {
-    	this.eventLogger.log(HotDeployerLogEvents.HOT_DEPLOY_PROCESSING_FILE, FileSystemEvent.INITIAL, getConcatenatedPaths(paths));
+        this.eventLogger.log(HotDeployerLogEvents.HOT_DEPLOY_PROCESSING_FILE, FileSystemEvent.INITIAL, getConcatenatedPaths(paths));
         try {
-        	bulkDeployIfNotDeployed(paths);
-           } catch (Exception ex) {
+            bulkDeployIfNotDeployed(paths);
+        } catch (Exception ex) {
             ex.printStackTrace(System.out);
             determineFailureAndLogMessage(FileSystemEvent.INITIAL, getConcatenatedPaths(paths), ex);
         }
     }
-    
-    private String getConcatenatedPaths(List<String> paths){
-    	StringBuilder sb = new StringBuilder("");
-    	for (String path:paths){
-    		sb.append(new PathReference(path).getName()).append("; ");
-    	}
-    	return new String(sb);
+
+    private String getConcatenatedPaths(List<String> paths) {
+        StringBuilder sb = new StringBuilder("");
+        for (String path : paths) {
+            sb.append(new PathReference(path).getName()).append("; ");
+        }
+        return new String(sb);
     }
-    
+
     /**
      * Collects only the source artifacts that are not yet deployed and transforms the given paths to URIs.
      * 
      */
-    private List<URI> getNotDeployedUris (List<String> sourceArtefacts){
-    	List<URI> notDeployedFileUris =  new ArrayList<URI>(); 
-    	for (String sourceArtefact:sourceArtefacts){
-    	 if (!isDeployed(sourceArtefact)) {
-    		 notDeployedFileUris.add(getDefinitiveUri(sourceArtefact));
-    		 logger.info("ApplicationConditionallyDeploying path '{}'.", sourceArtefact);
-         } else {
-             this.eventLogger.log(HotDeployerLogEvents.HOT_DEPLOY_SKIPPED, sourceArtefact);
-         }
-    	}
-    	return notDeployedFileUris;
+    private List<URI> getNotDeployedUris(List<String> sourceArtefacts) {
+        List<URI> notDeployedFileUris = new ArrayList<URI>();
+        for (String sourceArtefact : sourceArtefacts) {
+            if (!isDeployed(sourceArtefact)) {
+                notDeployedFileUris.add(getDefinitiveUri(sourceArtefact));
+                this.logger.info("ApplicationConditionallyDeploying path '{}'.", sourceArtefact);
+            } else {
+                this.eventLogger.log(HotDeployerLogEvents.HOT_DEPLOY_SKIPPED, sourceArtefact);
+            }
+        }
+        return notDeployedFileUris;
     }
-    
-    
+
     /**
-     * Triggers bulk deployment of source artifacts that are not yet deployed. 
-     *  
+     * Triggers bulk deployment of source artifacts that are not yet deployed.
+     * 
      * @param sourceArtefact the source artifact URI string
      * @throws DeploymentException
      */
-    private void bulkDeployIfNotDeployed(List<String> sourceArtefacts) throws DeploymentException{
-    		this.deployer.bulkDeploy(getNotDeployedUris(sourceArtefacts), new DeploymentOptions(true, true, false));
+    private void bulkDeployIfNotDeployed(List<String> sourceArtefacts) throws DeploymentException {
+        this.deployer.bulkDeploy(getNotDeployedUris(sourceArtefacts), new DeploymentOptions(true, true, false));
     }
-    
 
     /**
      * Determines the {@link LogEvent} that corresponds the {@link FileSystemEvent}.
@@ -208,7 +204,7 @@
         }
         return baseUri;
     }
-    
+
     /**
      * Deploys the application at the supplied PathReference asynchronously.
      * 
@@ -234,7 +230,6 @@
         }
     }
 
-
     /**
      * {@inheritDoc}
      */
diff --git a/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/SimpleDeployer.java b/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/SimpleDeployer.java
index 562fe8f..bd8ce0e 100644
--- a/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/SimpleDeployer.java
+++ b/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/SimpleDeployer.java
@@ -1,3 +1,4 @@
+
 package org.eclipse.virgo.nano.deployer;
 
 import java.io.File;
@@ -8,27 +9,27 @@
 import org.osgi.framework.Bundle;
 
 public interface SimpleDeployer {
-    
+
     public final int HOT_DEPLOYED_ARTIFACTS_START_LEVEL = 5;
 
     public boolean deploy(URI path);
-    
+
     public boolean install(URI path);
-    
+
     public boolean start(URI path);
-    
+
     public boolean update(URI path);
-    
+
     public boolean undeploy(Bundle bundle);
-    
+
     public boolean canServeFileType(String fileType);
-    
+
     public boolean isDeployed(URI path);
-    
+
     public DeploymentIdentity getDeploymentIdentity(URI path);
-    
+
     public List<String> getAcceptedFileTypes();
-    
+
     public boolean isDeployFileValid(File file);
-    
+
 }
diff --git a/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/BundleDeployer.java b/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/BundleDeployer.java
index 8ac1211..8d5fa84 100644
--- a/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/BundleDeployer.java
+++ b/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/BundleDeployer.java
@@ -13,11 +13,11 @@
 import java.util.List;
 import java.util.jar.JarFile;
 
-import org.eclipse.virgo.nano.deployer.api.core.DeploymentIdentity;
 import org.eclipse.virgo.medic.eventlog.EventLogger;
 import org.eclipse.virgo.nano.deployer.NanoDeployerLogEvents;
 import org.eclipse.virgo.nano.deployer.SimpleDeployer;
 import org.eclipse.virgo.nano.deployer.StandardDeploymentIdentity;
+import org.eclipse.virgo.nano.deployer.api.core.DeploymentIdentity;
 import org.eclipse.virgo.nano.deployer.util.BundleInfosUpdater;
 import org.eclipse.virgo.util.io.FileCopyUtils;
 import org.eclipse.virgo.util.io.IOUtils;
@@ -49,7 +49,7 @@
     private static final String UNKNOWN = "unknown";
 
     private static final String INSTALL_BY_REFERENCE_PREFIX = "reference:file:";
-    
+
     private static final String FRAGMEN_HOST_HEADER = "Fragment-Host";
 
     private final EventLogger eventLogger;
@@ -78,8 +78,8 @@
         String staging = "staging";
         this.workBundleInstallLocation = new File(kernelHomeFile, "work" + File.separator + thisBundleName + File.separator + staging);
     }
-    
-    private Boolean createInstallationFolder(){
+
+    private Boolean createInstallationFolder() {
         if (!this.workBundleInstallLocation.exists()) {
             if (!this.workBundleInstallLocation.mkdirs()) {
                 this.logger.error("Failed to create staging directory '" + this.workBundleInstallLocation.getAbsolutePath()
@@ -89,52 +89,52 @@
         }
         return true;
     }
-    
-    private boolean validateUri(URI uri){
-		if (!canWrite(uri)) {
+
+    private boolean validateUri(URI uri) {
+        if (!canWrite(uri)) {
             this.logger.error("Cannot open the file " + uri + " for writing. The configured timeout is " + this.largeFileCopyTimeout + ".");
             return false;
-		}
-		return true;
+        }
+        return true;
     }
-    
-    private Boolean isFragment(FragmentHost hostHolder){
-    	return (hostHolder != null && hostHolder.getBundleSymbolicName() != null);
+
+    private Boolean isFragment(FragmentHost hostHolder) {
+        return hostHolder != null && hostHolder.getBundleSymbolicName() != null;
     }
-    
-    private Boolean isFragment(Bundle bundle){
-    	Enumeration<String> keys = bundle.getHeaders().keys();
-    	while (keys.hasMoreElements()){
-    		if (keys.nextElement().equalsIgnoreCase(FRAGMEN_HOST_HEADER) ){
-    			return true;
-    		}
-    	}
-    	return false;
+
+    private Boolean isFragment(Bundle bundle) {
+        Enumeration<String> keys = bundle.getHeaders().keys();
+        while (keys.hasMoreElements()) {
+            if (keys.nextElement().equalsIgnoreCase(FRAGMEN_HOST_HEADER)) {
+                return true;
+            }
+        }
+        return false;
     }
-    
-    private void refreshHosts(FragmentHost hostHolder, Bundle fragment){
-    	 try {
-             Bundle[] hosts = this.packageAdmin.getBundles(hostHolder.getBundleSymbolicName(), null);
-             if (hosts != null) {
-             	this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESHING_HOST, fragment.getSymbolicName(), fragment.getVersion());
-             	this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESHING_HOST, fragment.getSymbolicName(), fragment.getVersion());
-                 this.packageAdmin.refreshPackages(hosts);
-                 this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESHED_HOST, fragment.getSymbolicName(), fragment.getVersion());
-             }
-         } catch (Exception e) {
-             this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESH_HOST_ERROR, e, fragment.getSymbolicName(), fragment.getVersion());
-         }
-         try {
-             if (this.bundleInfosUpdater != null && this.bundleInfosUpdater.isAvailable()) {
-                 registerToBundlesInfo(fragment, true);
-             }
-         } catch (Exception e) {
-             this.eventLogger.log(NanoDeployerLogEvents.NANO_PERSIST_ERROR, e, fragment.getSymbolicName(), fragment.getVersion());
-         }
+
+    private void refreshHosts(FragmentHost hostHolder, Bundle fragment) {
+        try {
+            Bundle[] hosts = this.packageAdmin.getBundles(hostHolder.getBundleSymbolicName(), null);
+            if (hosts != null) {
+                this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESHING_HOST, fragment.getSymbolicName(), fragment.getVersion());
+                this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESHING_HOST, fragment.getSymbolicName(), fragment.getVersion());
+                this.packageAdmin.refreshPackages(hosts);
+                this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESHED_HOST, fragment.getSymbolicName(), fragment.getVersion());
+            }
+        } catch (Exception e) {
+            this.eventLogger.log(NanoDeployerLogEvents.NANO_REFRESH_HOST_ERROR, e, fragment.getSymbolicName(), fragment.getVersion());
+        }
+        try {
+            if (this.bundleInfosUpdater != null && this.bundleInfosUpdater.isAvailable()) {
+                registerToBundlesInfo(fragment, true);
+            }
+        } catch (Exception e) {
+            this.eventLogger.log(NanoDeployerLogEvents.NANO_PERSIST_ERROR, e, fragment.getSymbolicName(), fragment.getVersion());
+        }
     }
-    
-    private void updateBundleInfo(Bundle bundle, Boolean isFragment){
-    	try {
+
+    private void updateBundleInfo(Bundle bundle, Boolean isFragment) {
+        try {
             if (this.bundleInfosUpdater != null && this.bundleInfosUpdater.isAvailable()) {
                 registerToBundlesInfo(bundle, true);
             }
@@ -142,64 +142,64 @@
             this.eventLogger.log(NanoDeployerLogEvents.NANO_PERSIST_ERROR, ex, bundle.getSymbolicName(), bundle.getVersion());
         }
     }
-    
-	@Override
-	public boolean install(URI uri) {
-		this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING, new File(uri).toString());
-		try{
-			if (!validateUri(uri) || !(createInstallationFolder())) {
-				this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING_ERROR, uri);
-				return STATUS_ERROR;
-			}
-			// copy bundle to work folder
-			File stagedFile = new File(workBundleInstallLocation, extractJarFileNameFromString(uri.toString()));
-			FileCopyUtils.copy(new File(uri), stagedFile);
-			
-			// install the bundle
-			final Bundle installed = this.bundleContext.installBundle(createInstallLocation(stagedFile));
-			final FragmentHost hostHolder = getFragmentHostFromDeployedBundleIfExsiting(stagedFile);
-			this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLED, installed.getSymbolicName(), installed.getVersion());
-			
-			//if fragment, refresh hosts and update bundles.info
-			if (isFragment(hostHolder)){
-				refreshHosts(hostHolder, installed);
-				updateBundleInfo(installed, true);
-			}
-		} catch (Exception e) {
-			this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING_ERROR, e, uri);
-			return STATUS_ERROR;
-		}            
-		return STATUS_OK;
-	}
-	
 
-	@Override
-	public boolean start(URI uri) {
-		Bundle installedBundle = getInstalledBundle(uri);
-		if (installedBundle != null){
-			this.eventLogger.log(NanoDeployerLogEvents.NANO_STARTING, installedBundle.getSymbolicName(), installedBundle.getVersion());
-			try {
-				if (!isFragment(installedBundle)){
-					installedBundle.start();
-					updateBundleInfo(installedBundle, false);
-				}else{
-					this.logger.warn("The installed bundle for the given url ["+ uri +"] is a fragment bundle. Start operation for this url failed. ");
-					return STATUS_ERROR;
-				}
-			} catch (Exception e) {
-				this.eventLogger.log(NanoDeployerLogEvents.NANO_STARTING_ERROR, e, installedBundle.getSymbolicName(), installedBundle.getVersion());
-				return STATUS_ERROR;
-			}
-			this.eventLogger.log(NanoDeployerLogEvents.NANO_STARTED, installedBundle.getSymbolicName(), installedBundle.getVersion());
-		}
-			return STATUS_OK;
-	}
-    
+    @Override
+    public boolean install(URI uri) {
+        this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING, new File(uri).toString());
+        try {
+            if (!validateUri(uri) || !createInstallationFolder()) {
+                this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING_ERROR, uri);
+                return STATUS_ERROR;
+            }
+            // copy bundle to work folder
+            File stagedFile = new File(this.workBundleInstallLocation, extractJarFileNameFromString(uri.toString()));
+            FileCopyUtils.copy(new File(uri), stagedFile);
+
+            // install the bundle
+            final Bundle installed = this.bundleContext.installBundle(createInstallLocation(stagedFile));
+            final FragmentHost hostHolder = getFragmentHostFromDeployedBundleIfExsiting(stagedFile);
+            this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLED, installed.getSymbolicName(), installed.getVersion());
+
+            // if fragment, refresh hosts and update bundles.info
+            if (isFragment(hostHolder)) {
+                refreshHosts(hostHolder, installed);
+                updateBundleInfo(installed, true);
+            }
+        } catch (Exception e) {
+            this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING_ERROR, e, uri);
+            return STATUS_ERROR;
+        }
+        return STATUS_OK;
+    }
+
+    @Override
+    public boolean start(URI uri) {
+        Bundle installedBundle = getInstalledBundle(uri);
+        if (installedBundle != null) {
+            this.eventLogger.log(NanoDeployerLogEvents.NANO_STARTING, installedBundle.getSymbolicName(), installedBundle.getVersion());
+            try {
+                if (!isFragment(installedBundle)) {
+                    installedBundle.start();
+                    updateBundleInfo(installedBundle, false);
+                } else {
+                    this.logger.warn("The installed bundle for the given url [" + uri
+                        + "] is a fragment bundle. Start operation for this url failed. ");
+                    return STATUS_ERROR;
+                }
+            } catch (Exception e) {
+                this.eventLogger.log(NanoDeployerLogEvents.NANO_STARTING_ERROR, e, installedBundle.getSymbolicName(), installedBundle.getVersion());
+                return STATUS_ERROR;
+            }
+            this.eventLogger.log(NanoDeployerLogEvents.NANO_STARTED, installedBundle.getSymbolicName(), installedBundle.getVersion());
+        }
+        return STATUS_OK;
+    }
+
     @Override
     public boolean deploy(URI path) {
         this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING, new File(path).toString());
         final File deployedFile = new File(path);
-        
+
         if (!canWrite(path)) {
             this.logger.error("Cannot open the file " + path + " for writing. The configured timeout is " + this.largeFileCopyTimeout + ".");
             this.eventLogger.log(NanoDeployerLogEvents.NANO_INSTALLING_ERROR, path);
@@ -217,7 +217,7 @@
                     return STATUS_ERROR;
                 }
             }
-            File stagedFile = new File(workBundleInstallLocation, extractJarFileNameFromString(path.toString()));
+            File stagedFile = new File(this.workBundleInstallLocation, extractJarFileNameFromString(path.toString()));
             FileCopyUtils.copy(deployedFile, stagedFile);
             // install the bundle
             installed = this.bundleContext.installBundle(createInstallLocation(stagedFile));
@@ -267,7 +267,7 @@
                 bundleJar.getInputStream(bundleJar.getEntry(JarFile.MANIFEST_NAME))));
             return manifest.getFragmentHost();
         } catch (IOException ioe) {
-            this.logger.error("Failed to extract the fragment host header from file '"+ stagedFile.getAbsolutePath() +"'.", ioe);
+            this.logger.error("Failed to extract the fragment host header from file '" + stagedFile.getAbsolutePath() + "'.", ioe);
             return null;
         } catch (BundleManifestParseException bmpe) {
             return null;
@@ -352,9 +352,9 @@
     public boolean canServeFileType(String fileType) {
         return JAR.equals(fileType);
     }
-    
-    private Bundle getInstalledBundle(URI uri){
-    	File matchingStagingBundle = new File(this.workBundleInstallLocation, extractJarFileNameFromString(uri.toString()));
+
+    private Bundle getInstalledBundle(URI uri) {
+        File matchingStagingBundle = new File(this.workBundleInstallLocation, extractJarFileNameFromString(uri.toString()));
         return this.bundleContext.getBundle(createInstallLocation(matchingStagingBundle));
     }
 
@@ -441,33 +441,32 @@
         final String warName = path.substring(path.lastIndexOf(SLASH) + 1);
         return warName;
     }
-    
+
     @Override
     public boolean isDeployFileValid(File file) {
-    	JarFile jarFile = null;
-    	try {
+        JarFile jarFile = null;
+        try {
             jarFile = new JarFile(file);
         } catch (IOException e) {
             this.logger.error("The deployed file '" + file.getAbsolutePath() + "' is an invalid zip file.");
             return false;
         } finally {
-        	try {
-        		if (jarFile != null) {
-        			jarFile.close();
-        		}
-        	} catch (IOException e) {
-        		// do nothing
-        	}
+            try {
+                if (jarFile != null) {
+                    jarFile.close();
+                }
+            } catch (IOException e) {
+                // do nothing
+            }
         }
-		return true;
-	}
+        return true;
+    }
 
-	@Override
-	public List<String> getAcceptedFileTypes() {
-		List<String> types = new ArrayList<String>();
-		types.add(JAR);
-		return types;
-	}
-
+    @Override
+    public List<String> getAcceptedFileTypes() {
+        List<String> types = new ArrayList<String>();
+        types.add(JAR);
+        return types;
+    }
 
 }
diff --git a/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/StandardApplicationDeployer.java b/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/StandardApplicationDeployer.java
index 0e0423b..f69a736 100644
--- a/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/StandardApplicationDeployer.java
+++ b/org.eclipse.virgo.nano.deployer/src/main/java/org/eclipse/virgo/nano/deployer/internal/StandardApplicationDeployer.java
@@ -6,15 +6,15 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.virgo.medic.eventlog.EventLogger;
 import org.eclipse.virgo.nano.core.KernelConfig;
+import org.eclipse.virgo.nano.deployer.NanoDeployerLogEvents;
+import org.eclipse.virgo.nano.deployer.SimpleDeployer;
 import org.eclipse.virgo.nano.deployer.api.core.ApplicationDeployer;
 import org.eclipse.virgo.nano.deployer.api.core.DeployerConfiguration;
 import org.eclipse.virgo.nano.deployer.api.core.DeploymentException;
 import org.eclipse.virgo.nano.deployer.api.core.DeploymentIdentity;
 import org.eclipse.virgo.nano.deployer.api.core.DeploymentOptions;
-import org.eclipse.virgo.medic.eventlog.EventLogger;
-import org.eclipse.virgo.nano.deployer.NanoDeployerLogEvents;
-import org.eclipse.virgo.nano.deployer.SimpleDeployer;
 import org.eclipse.virgo.nano.deployer.support.HotDeployerEnabler;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -45,7 +45,7 @@
     public void activate(ComponentContext context) throws Exception {
         this.bundleContext = context.getBundleContext();
         this.defaultDeployer = new BundleDeployer(context.getBundleContext(), this.packageAdmin, this.eventLogger);
-        this.simpleDeployers.add(defaultDeployer);
+        this.simpleDeployers.add(this.defaultDeployer);
         initialiseHotDeployer();
 
         // TODO register the deployer MBean when the management classes are factored out in a new bundle.
@@ -73,47 +73,45 @@
             if (deployer.canServeFileType(getFileTypeFromUri(uri))) {
                 isThereSuitableDeployer = true;
                 if (!deployer.isDeployFileValid(new File(uri))) {
-                	this.eventLogger.log(NanoDeployerLogEvents.NANO_INVALID_FILE);
-				} else {
-					if (deployer.isDeployed(uri)) {
-						deployer.update(uri);
-					} else {
-						deployer.deploy(uri);
-					}
-				}
+                    this.eventLogger.log(NanoDeployerLogEvents.NANO_INVALID_FILE);
+                } else {
+                    if (deployer.isDeployed(uri)) {
+                        deployer.update(uri);
+                    } else {
+                        deployer.deploy(uri);
+                    }
+                }
             }
         }
         if (!isThereSuitableDeployer) {
-        	handleUnsupportedFileType(uri);
+            handleUnsupportedFileType(uri);
         }
         return null;
     }
-    
-	@Override
-	public DeploymentIdentity[] bulkDeploy(List<URI> uris,
-			DeploymentOptions options) throws DeploymentException {
-		if (uris != null && !uris.isEmpty()) {
-			installDeployables(uris);
-			startDeployables(uris);
-			return getDeploymentIdentities(uris);
-		}else{
-			this.logger
-			.warn("Cannot perform bulk deploy operation of the given URIs list as it is either empty or null.");
-			return null;
-		}
-	}
-    
-    private DeploymentIdentity[] getDeploymentIdentities(List<URI> uris){
-    	List<DeploymentIdentity> accumulatedDIs = new ArrayList<DeploymentIdentity>();
-    	for(URI uri:uris){
-    		DeploymentIdentity di = getDeploymentIdentity(uri);
-    		if (di != null){
-    			accumulatedDIs.add(di);
-    		}
-    	}
-    	return accumulatedDIs.toArray(new DeploymentIdentity[0]);
+
+    @Override
+    public DeploymentIdentity[] bulkDeploy(List<URI> uris, DeploymentOptions options) throws DeploymentException {
+        if (uris != null && !uris.isEmpty()) {
+            installDeployables(uris);
+            startDeployables(uris);
+            return getDeploymentIdentities(uris);
+        } else {
+            this.logger.warn("Cannot perform bulk deploy operation of the given URIs list as it is either empty or null.");
+            return null;
+        }
     }
- 
+
+    private DeploymentIdentity[] getDeploymentIdentities(List<URI> uris) {
+        List<DeploymentIdentity> accumulatedDIs = new ArrayList<DeploymentIdentity>();
+        for (URI uri : uris) {
+            DeploymentIdentity di = getDeploymentIdentity(uri);
+            if (di != null) {
+                accumulatedDIs.add(di);
+            }
+        }
+        return accumulatedDIs.toArray(new DeploymentIdentity[0]);
+    }
+
     @Override
     public void undeploy(DeploymentIdentity deploymentIdentity) throws DeploymentException {
         if (this.bundleContext != null) {
@@ -255,55 +253,55 @@
     public void unbindSimpleDeployer(SimpleDeployer deployer) {
         this.simpleDeployers.remove(deployer);
     }
-    
-    private void handleUnsupportedFileType(URI uri){
-    	List<String> acceptedTypes = new ArrayList<String>();
-		for (SimpleDeployer deployer : this.simpleDeployers) {
-			acceptedTypes.addAll(deployer.getAcceptedFileTypes());
-		}
-		this.eventLogger.log(NanoDeployerLogEvents.NANO_UNRECOGNIZED_TYPE, uri, acceptedTypes);
-    }
-    
-    private void installDeployables(List<URI> uris){
-    	for (URI uri:uris){
-        	boolean isThereSuitableDeployer = false;
-    		for (SimpleDeployer deployer : this.simpleDeployers) {
-    			if (deployer.canServeFileType(getFileTypeFromUri(uri))) {
-    				isThereSuitableDeployer = true;
-    				if (!deployer.isDeployFileValid(new File(uri))) {
-    					this.eventLogger.log(NanoDeployerLogEvents.NANO_INVALID_FILE);
-    				} else {
-    					if (deployer.isDeployed(uri)) { 
-    						deployer.update(uri);
-    					} else {
-    						deployer.install(uri);
-    					}
-    				}
-    			}
-    		}
-    		if (!isThereSuitableDeployer) {
-    			handleUnsupportedFileType(uri);
-    		}
-    	}
+
+    private void handleUnsupportedFileType(URI uri) {
+        List<String> acceptedTypes = new ArrayList<String>();
+        for (SimpleDeployer deployer : this.simpleDeployers) {
+            acceptedTypes.addAll(deployer.getAcceptedFileTypes());
+        }
+        this.eventLogger.log(NanoDeployerLogEvents.NANO_UNRECOGNIZED_TYPE, uri, acceptedTypes);
     }
 
-    private  void startDeployables (List<URI> uris){
-    	for (URI uri:uris){
-        	boolean isThereSuitableDeployer = false;
-    		for (SimpleDeployer deployer : this.simpleDeployers) {
-    			if (deployer.canServeFileType(getFileTypeFromUri(uri))) {
-    				isThereSuitableDeployer = true;
-    				if (!deployer.isDeployFileValid(new File(uri))) {
-    					this.eventLogger.log(NanoDeployerLogEvents.NANO_INVALID_FILE);
-    				} else {
-    						deployer.start(uri);
-    				}    				
-    			}
-    		}
-    		if (!isThereSuitableDeployer) {
-    			handleUnsupportedFileType(uri);
-    		}
-    	}
+    private void installDeployables(List<URI> uris) {
+        for (URI uri : uris) {
+            boolean isThereSuitableDeployer = false;
+            for (SimpleDeployer deployer : this.simpleDeployers) {
+                if (deployer.canServeFileType(getFileTypeFromUri(uri))) {
+                    isThereSuitableDeployer = true;
+                    if (!deployer.isDeployFileValid(new File(uri))) {
+                        this.eventLogger.log(NanoDeployerLogEvents.NANO_INVALID_FILE);
+                    } else {
+                        if (deployer.isDeployed(uri)) {
+                            deployer.update(uri);
+                        } else {
+                            deployer.install(uri);
+                        }
+                    }
+                }
+            }
+            if (!isThereSuitableDeployer) {
+                handleUnsupportedFileType(uri);
+            }
+        }
+    }
+
+    private void startDeployables(List<URI> uris) {
+        for (URI uri : uris) {
+            boolean isThereSuitableDeployer = false;
+            for (SimpleDeployer deployer : this.simpleDeployers) {
+                if (deployer.canServeFileType(getFileTypeFromUri(uri))) {
+                    isThereSuitableDeployer = true;
+                    if (!deployer.isDeployFileValid(new File(uri))) {
+                        this.eventLogger.log(NanoDeployerLogEvents.NANO_INVALID_FILE);
+                    } else {
+                        deployer.start(uri);
+                    }
+                }
+            }
+            if (!isThereSuitableDeployer) {
+                handleUnsupportedFileType(uri);
+            }
+        }
     }
 
 }
diff --git a/org.eclipse.virgo.nano.war.deployer/src/main/java/org/eclipse/virgo/nano/war/deployer/WARDeployer.java b/org.eclipse.virgo.nano.war.deployer/src/main/java/org/eclipse/virgo/nano/war/deployer/WARDeployer.java
index 852a73b..6ffe817 100644
--- a/org.eclipse.virgo.nano.war.deployer/src/main/java/org/eclipse/virgo/nano/war/deployer/WARDeployer.java
+++ b/org.eclipse.virgo.nano.war.deployer/src/main/java/org/eclipse/virgo/nano/war/deployer/WARDeployer.java
@@ -23,11 +23,11 @@
 
 import org.eclipse.gemini.web.core.InstallationOptions;
 import org.eclipse.gemini.web.core.WebBundleManifestTransformer;
-import org.eclipse.virgo.nano.core.KernelConfig;
-import org.eclipse.virgo.nano.deployer.api.core.DeploymentIdentity; 
 import org.eclipse.virgo.medic.eventlog.EventLogger;
+import org.eclipse.virgo.nano.core.KernelConfig;
 import org.eclipse.virgo.nano.deployer.SimpleDeployer;
 import org.eclipse.virgo.nano.deployer.StandardDeploymentIdentity;
+import org.eclipse.virgo.nano.deployer.api.core.DeploymentIdentity;
 import org.eclipse.virgo.nano.deployer.util.BundleInfosUpdater;
 import org.eclipse.virgo.util.io.FileSystemUtils;
 import org.eclipse.virgo.util.io.IOUtils;
@@ -91,21 +91,21 @@
     private static final String UNKNOWN = "unknown";
 
     private static final String HEADER_WEB_CONTEXT_PATH = "Web-ContextPath";
-    
-    //private static final String HEADER_BUNDLE_SYMBOLIC_NAME = "Bundle-SymbolicName";
-    
+
+    // private static final String HEADER_BUNDLE_SYMBOLIC_NAME = "Bundle-SymbolicName";
+
     private static final String DEFAULT_CONTEXT_PATH = "/";
-    
+
     private static final String ROOT_WAR_NAME = "ROOT";
-    
+
     private static final String PROPERTY_WAB_HEADERS = "WABHeaders";
 
     private static final String PROPERTY_VALUE_WAB_HEADERS_STRICT = "strict";
 
     private static final String PROPERTY_VALUE_WAB_HEADERS_DEFAULTED = "defaulted";
-    
+
     private static final String HEADER_DEFAULT_WAB_HEADERS = "org-eclipse-gemini-web-DefaultWABHeaders";
-    
+
     private static final String WEB_BUNDLE_MODULE_TYPE = "web-bundle";
 
     private EventLogger eventLogger;
@@ -127,7 +127,7 @@
     private File webAppsDir;
 
     private KernelConfig kernelConfig;
-    
+
     public WARDeployer() {
         warDeployerInternalInit(null);
     }
@@ -144,7 +144,7 @@
     public void activate(ComponentContext context) {
         warDeployerInternalInit(context.getBundleContext());
     }
-    
+
     @Override
     public final boolean deploy(URI path) {
         this.eventLogger.log(NanoWARDeployerLogEvents.NANO_INSTALLING, new File(path).toString());
@@ -212,20 +212,20 @@
 
     @Override
     public boolean isDeployFileValid(File file) {
-    	JarFile jarFile = null;
-    	try {
+        JarFile jarFile = null;
+        try {
             jarFile = new JarFile(file);
         } catch (IOException e) {
             this.logger.error("The deployed file '" + file.getAbsolutePath() + "' is an invalid zip file.");
             return false;
         } finally {
-        	try {
-        		if (jarFile != null) {
-        			jarFile.close();
-        		}
-        	} catch (IOException e) {
-        		// do nothing
-        	}
+            try {
+                if (jarFile != null) {
+                    jarFile.close();
+                }
+            } catch (IOException e) {
+                // do nothing
+            }
         }
         return true;
     }
@@ -245,7 +245,7 @@
         String warPath = extractWarPath(bundleLocation);
         final File warDir = new File(warPath);
         String warName = extractWarName(warPath);
-        
+
         deleteStatusFile(warName, this.pickupDir);
 
         if (bundle != null) {
@@ -277,7 +277,7 @@
         createStatusFile(warName, OP_UNDEPLOY, STATUS_OK, bundle.getBundleId(), bundle.getLastModified());
         return STATUS_OK;
     }
-    
+
     private String extractWarName(String warPath) {
         return warPath.substring(warPath.lastIndexOf(File.separatorChar) + 1, warPath.length());
     }
@@ -451,17 +451,17 @@
             mfIS = new FileInputStream(srcFile + File.separator + JarFile.MANIFEST_NAME);
             BundleManifest manifest = BundleManifestFactory.createBundleManifest(new InputStreamReader(mfIS));
             if (manifest.getModuleType() == null || "web".equalsIgnoreCase(manifest.getModuleType())) {
-            	boolean strictWABHeaders = getStrictWABHeadersValue();
-            	if (!strictWABHeaders) {
+                boolean strictWABHeaders = getStrictWABHeadersValue();
+                if (!strictWABHeaders) {
                     manifest.setHeader(HEADER_DEFAULT_WAB_HEADERS, "true");
                 }
-            	manifest.setModuleType(WEB_BUNDLE_MODULE_TYPE);
-            	InstallationOptions installationOptions = prepareInstallationOptions(strictWABHeaders, warName, manifest);
-            	boolean isWebBundle = WebBundleUtils.isWebApplicationBundle(manifest);
+                manifest.setModuleType(WEB_BUNDLE_MODULE_TYPE);
+                InstallationOptions installationOptions = prepareInstallationOptions(strictWABHeaders, warName, manifest);
+                boolean isWebBundle = WebBundleUtils.isWebApplicationBundle(manifest);
                 this.webBundleManifestTransformer.transform(manifest, srcFile.toURI().toURL(), installationOptions, isWebBundle);
             } else {
-            	this.logger.info("Skipping transformation of application '" + warName + "' because it is already a web bundle.");
-        		return;
+                this.logger.info("Skipping transformation of application '" + warName + "' because it is already a web bundle.");
+                return;
             }
             fos = new FileOutputStream(destFile);
             toManifest(manifest.toDictionary()).write(fos);
@@ -472,19 +472,19 @@
     }
 
     private InstallationOptions prepareInstallationOptions(boolean strictWABHeaders, String warName, BundleManifest manifest) {
-    	Map<String, String> map = new HashMap<String, String>();
+        Map<String, String> map = new HashMap<String, String>();
         String webContextPathHeader = manifest.getHeader(HEADER_WEB_CONTEXT_PATH);
         if (webContextPathHeader == null || webContextPathHeader.trim().length() == 0) {
-        	if (warName.equals(ROOT_WAR_NAME)) {
-        		map.put(HEADER_WEB_CONTEXT_PATH, DEFAULT_CONTEXT_PATH);
-        	} else {
-        		map.put(HEADER_WEB_CONTEXT_PATH, warName);
-        	}
+            if (warName.equals(ROOT_WAR_NAME)) {
+                map.put(HEADER_WEB_CONTEXT_PATH, DEFAULT_CONTEXT_PATH);
+            } else {
+                map.put(HEADER_WEB_CONTEXT_PATH, warName);
+            }
         }
-                
+
         InstallationOptions installationOptions = new InstallationOptions(map);
         installationOptions.setDefaultWABHeaders(!strictWABHeaders);
-        
+
         return installationOptions;
     }
 
@@ -585,28 +585,28 @@
         this.bundleInfosUpdaterUtil = new BundleInfosUpdater(bundlesInfoFile, kernelHomeFile);
     }
 
-	private boolean getStrictWABHeadersValue() {
-		boolean strictWABHeaders = true;
+    private boolean getStrictWABHeadersValue() {
+        boolean strictWABHeaders = true;
         String wabHeadersPropertyValue = null;
-        if (kernelConfig.getProperty(PROPERTY_WAB_HEADERS) != null) {
-           wabHeadersPropertyValue = kernelConfig.getProperty(PROPERTY_WAB_HEADERS).toString();
+        if (this.kernelConfig.getProperty(PROPERTY_WAB_HEADERS) != null) {
+            wabHeadersPropertyValue = this.kernelConfig.getProperty(PROPERTY_WAB_HEADERS).toString();
         }
         if (wabHeadersPropertyValue != null) {
             if (PROPERTY_VALUE_WAB_HEADERS_DEFAULTED.equals(wabHeadersPropertyValue)) {
                 strictWABHeaders = false;
-                logger.info("Property '%s' has value [defaulted]", new String[] { PROPERTY_WAB_HEADERS });
+                this.logger.info("Property '%s' has value [defaulted]", new String[] { PROPERTY_WAB_HEADERS });
             } else if (!PROPERTY_VALUE_WAB_HEADERS_STRICT.equals(wabHeadersPropertyValue)) {
-            	logger.error("Property '%s' has invalid value '%s'", new String[] { PROPERTY_WAB_HEADERS, wabHeadersPropertyValue });
-            } 
+                this.logger.error("Property '%s' has invalid value '%s'", new String[] { PROPERTY_WAB_HEADERS, wabHeadersPropertyValue });
+            }
         }
-        
+
         return strictWABHeaders;
-	}
+    }
 
     public void bindWebBundleManifestTransformer(WebBundleManifestTransformer transformer) {
         this.webBundleManifestTransformer = transformer;
     }
-    
+
     public void unbindWebBundleManifestTransformer(WebBundleManifestTransformer transformer) {
         this.webBundleManifestTransformer = null;
     }
@@ -626,7 +626,7 @@
     public void unbindPackageAdmin(PackageAdmin packageAdmin) {
         this.packageAdmin = null;
     }
-    
+
     public void bindKernelConfig(KernelConfig kernelConfig) {
         this.kernelConfig = kernelConfig;
     }
@@ -635,9 +635,9 @@
         this.kernelConfig = null;
     }
 
-   @Override
-	public boolean install(URI uri) {
-		this.eventLogger.log(NanoWARDeployerLogEvents.NANO_INSTALLING, new File(uri).toString());
+    @Override
+    public boolean install(URI uri) {
+        this.eventLogger.log(NanoWARDeployerLogEvents.NANO_INSTALLING, new File(uri).toString());
         final String warName = extractWarNameFromString(uri.toString());
         final File deployedFile = new File(uri);
         final File warDir = new File(this.webAppsDir, warName);
@@ -664,56 +664,56 @@
             createStatusFile(warName, OP_DEPLOY, STATUS_ERROR, -1L, lastModified);
             return false;
         }
-		return true;
-	}
-	
-	@Override
-	public boolean start(URI uri) {
-		Bundle bundle = getInstalledBundle(uri);
-		final String warName = extractWarNameFromString(uri.toString());
+        return true;
+    }
+
+    @Override
+    public boolean start(URI uri) {
+        Bundle bundle = getInstalledBundle(uri);
+        final String warName = extractWarNameFromString(uri.toString());
         deleteStatusFile(warName, this.pickupDir);
         final long lastModified = new File(uri).lastModified();
-		this.eventLogger.log(NanoWARDeployerLogEvents.NANO_WEB_STARTING, bundle.getSymbolicName(), bundle.getVersion());
+        this.eventLogger.log(NanoWARDeployerLogEvents.NANO_WEB_STARTING, bundle.getSymbolicName(), bundle.getVersion());
         try {
-        	bundle.start();
+            bundle.start();
         } catch (Exception e) {
             this.eventLogger.log(NanoWARDeployerLogEvents.NANO_STARTING_ERROR, e, bundle.getSymbolicName(), bundle.getVersion());
             createStatusFile(warName, OP_DEPLOY, STATUS_ERROR, bundle.getBundleId(), lastModified);
             return STATUS_ERROR;
         }
         this.eventLogger.log(NanoWARDeployerLogEvents.NANO_WEB_STARTED, bundle.getSymbolicName(), bundle.getVersion());
-        
-        // now update bundle's info	
-        if (!updateBundlesInfo(bundle)){
+
+        // now update bundle's info
+        if (!updateBundlesInfo(bundle)) {
             createStatusFile(warName, OP_DEPLOY, STATUS_ERROR, bundle.getBundleId(), lastModified);
             return STATUS_ERROR;
         }
         createStatusFile(warName, OP_DEPLOY, STATUS_OK, bundle.getBundleId(), lastModified);
         return STATUS_OK;
-	}
-	
-    private boolean updateBundlesInfo(Bundle bundle){
+    }
+
+    private boolean updateBundlesInfo(Bundle bundle) {
         if (this.logger.isInfoEnabled()) {
             this.logger.info("Bundles info will be updated for web app bundle with simbolic name '" + bundle.getSymbolicName() + "' .");
         }
-    	 try {
-             if (this.bundleInfosUpdaterUtil != null && this.bundleInfosUpdaterUtil.isAvailable()) {
-                 registerToBundlesInfo(bundle);
-             }
-         } catch (Exception e) {
-             this.eventLogger.log(NanoWARDeployerLogEvents.NANO_PERSIST_ERROR, e, bundle.getSymbolicName(), bundle.getVersion());
-             return STATUS_ERROR;
-         }
-         return STATUS_OK;
+        try {
+            if (this.bundleInfosUpdaterUtil != null && this.bundleInfosUpdaterUtil.isAvailable()) {
+                registerToBundlesInfo(bundle);
+            }
+        } catch (Exception e) {
+            this.eventLogger.log(NanoWARDeployerLogEvents.NANO_PERSIST_ERROR, e, bundle.getSymbolicName(), bundle.getVersion());
+            return STATUS_ERROR;
+        }
+        return STATUS_OK;
     }
-    
-    private Bundle getInstalledBundle(URI path){
-    	final String warName = extractWarNameFromString(path.toString());
+
+    private Bundle getInstalledBundle(URI path) {
+        final String warName = extractWarNameFromString(path.toString());
         final File warDir = new File(this.webAppsDir, warName);
         if (!warDir.exists()) {
             return null;
         }
         return this.bundleContext.getBundle(createInstallLocation(warDir));
     }
-	
+
 }