You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2008/03/20 01:02:01 UTC

svn commit: r639085 - in /openejb/branches/openejb-3.0/container/openejb-core/src: main/java/org/apache/openejb/assembler/classic/cmd/ main/java/org/apache/openejb/cli/ main/java/org/apache/openejb/config/ main/java/org/apache/openejb/util/ main/resour...

Author: dblevins
Date: Wed Mar 19 17:01:57 2008
New Revision: 639085

URL: http://svn.apache.org/viewvc?rev=639085&view=rev
Log:
Merging r636945 - http://svn.apache.org/viewvc?rev=636945&view=rev

svn merge -r 636944:636945 http://svn.apache.org/repos/asf/openejb/trunk/openejb3 .

------------------------------------------------------------------------
r636847 | kmalhi | 2008-03-13 12:35:27 -0700 (Thu, 13 Mar 2008) | 2 lines

Added system properties to SystemInstance

------------------------------------------------------------------------

Modified:
    openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/cmd/Info2Properties.java
    openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java
    openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Deploy.java
    openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Undeploy.java
    openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java
    openejb/branches/openejb-3.0/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties
    openejb/branches/openejb-3.0/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java

Modified: openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/cmd/Info2Properties.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/cmd/Info2Properties.java?rev=639085&r1=639084&r2=639085&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/cmd/Info2Properties.java (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/cmd/Info2Properties.java Wed Mar 19 17:01:57 2008
@@ -30,6 +30,7 @@
 import org.apache.openejb.util.Messages;
 import org.apache.openejb.util.OpenEjbVersion;
 import org.apache.openejb.util.URISupport;
+import org.apache.openejb.util.SuperProperties;
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -227,7 +228,7 @@
             // TODO: the codebase value usually isn't filled in, we should do that.
             // comment("codebase: " + info.codebase);
             comment("");
-            Properties p = new Properties();
+            Properties p = new SuperProperties();
 
 
             String uri = "new://" + info.service;

Modified: openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java?rev=639085&r1=639084&r2=639085&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/cli/MainImpl.java Wed Mar 19 17:01:57 2008
@@ -152,7 +152,7 @@
         } catch (Throwable e) {
             if (line.hasOption("errors")) {
                 e.printStackTrace();
-            }   
+            }
             System.exit(-10);
         }
     }
@@ -196,6 +196,7 @@
                 InputStream in = new BufferedInputStream(fin);
                 systemProperties.load(in);
                 System.getProperties().putAll(systemProperties);
+                systemInstance.getProperties().putAll(systemProperties);
             }
         } catch (IOException e) {
             System.out.println("Processing conf/system.properties failed: "+e.getMessage());
@@ -209,11 +210,12 @@
                 String val = arg.substring(arg.indexOf("=") + 1);
 
                 System.setProperty(prop, val);
+                systemInstance.setProperty(prop, val);
             } else {
                 argsList.add(arg);
             }
         }
-        SystemInstance.get().getProperties().putAll(System.getProperties());
+
         args = (String[]) argsList.toArray(new String[argsList.size()]);
         return args;
     }

Modified: openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Deploy.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Deploy.java?rev=639085&r1=639084&r2=639085&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Deploy.java (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Deploy.java Wed Mar 19 17:01:57 2008
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.config;
 
+import static org.apache.openejb.config.JarExtractor.delete;
+
 import java.io.Closeable;
 import java.io.File;
 import java.io.FileInputStream;
@@ -38,6 +40,8 @@
 import org.apache.commons.cli.ParseException;
 import org.apache.commons.cli.PosixParser;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.UndeployException;
+import org.apache.openejb.NoSuchApplicationException;
 import org.apache.openejb.assembler.Deployer;
 import org.apache.openejb.assembler.classic.AppInfo;
 import org.apache.openejb.assembler.classic.ClientInfo;
@@ -75,6 +79,7 @@
         options.addOption(option("s", "server-url", "url", "cmd.deploy.opt.server"));
         options.addOption(option("d", "debug", "cmd.deploy.opt.debug"));
         options.addOption(option("q", "quiet", "cmd.deploy.opt.quiet"));
+        options.addOption(option("u", "undeploy", "cmd.deploy.opt.undeploy"));
         options.addOption(option(null, "dir", "cmd.deploy.opt.dir"));
 
         CommandLine line;
@@ -110,7 +115,7 @@
             } catch (DeploymentTerminatedException e) {
                 System.out.println(e.getMessage());
                 // TODO: What is it for?
-                throw new SystemExitException(100);
+                throw new SystemExitException(-100);
             }
         }
 
@@ -145,27 +150,36 @@
             } catch (javax.naming.ServiceUnavailableException e) {
                 System.out.println(e.getCause().getMessage());
                 System.out.println(messages.format("cmd.deploy.serverOffline"));
-                throw new SystemExitException(1);
+                throw new SystemExitException(-1);
             } catch (javax.naming.NamingException e) {
                 System.out.println("openejb/DeployerBusinessRemote does not exist in server '" + serverUrl
                         + "', check the server logs to ensure it exists and has not been removed.");
-                throw new SystemExitException(2);
+                throw new SystemExitException(-2);
             }
         }
 
+        boolean undeploy = line.hasOption("undeploy");
+
+        // We increment the exit code once for every failed deploy
         int exitCode = 0;
         for (Object obj : line.getArgList()) {
             String path = (String) obj;
 
-            try {
-                File file = new File(path);
-
-                File destFile = new File(apps, file.getName());
+            File file = new File(path);
 
+            File destFile = new File(apps, file.getName());
 
+            try {
                 if (shouldUnpack(file)) {
-                    destFile = unpack(file, apps);
+                    File unpacked = unpackedLocation(file, apps);
+                    if (undeploy) {
+                        undeploy(offline, unpacked, path, deployer);
+                    }
+                    destFile = unpack(file, unpacked);
                 } else {
+                    if (undeploy){
+                        undeploy(offline, destFile, path, deployer);
+                    }
                     checkDest(destFile, file);
                     copyFile(file, destFile);
                 }
@@ -189,41 +203,15 @@
                     continue;
                 }
 
-                System.out.println("App(id=" + appInfo.jarPath + ")");
+                print(appInfo);
 
-                for (EjbJarInfo info : appInfo.ejbJars) {
-                    System.out.println("    EjbJar(id=" + info.moduleId + ", path=" + info.jarPath + ")");
-                    for (EnterpriseBeanInfo beanInfo : info.enterpriseBeans) {
-                        System.out.println("        Ejb(ejb-name=" + beanInfo.ejbName + ", id=" + beanInfo.ejbDeploymentId + ")");
-                        for (String name : beanInfo.jndiNames) {
-                            System.out.println("            Jndi(name=" + name + ")");
-                        }
-                        System.out.println("");
-                    }
-                    for (InterceptorInfo interceptorInfo : info.interceptors) {
-                        System.out.println("        Interceptor(class=" + interceptorInfo.clazz + ")");
-                    }
-                    System.out.println("");
-                }
-                for (ClientInfo clientInfo : appInfo.clients) {
-                    System.out.println("    Client(main-class=" + clientInfo.mainClass + ", id=" + clientInfo.moduleId + ", path=" + clientInfo.codebase + ")");
-                    System.out.println("");
-                }
-                for (ConnectorInfo connectorInfo : appInfo.connectors) {
-                    System.out.println("    Connector(id=" + connectorInfo.moduleId + ", path=" + connectorInfo.codebase + ")");
-                    System.out.println("");
-                }
-                for (WebAppInfo webAppInfo : appInfo.webApps) {
-                    System.out.println("    WebApp(context-root=" + webAppInfo.contextRoot + ", id=" + webAppInfo.moduleId + ", path=" + webAppInfo.codebase + ")");
-                    System.out.println("");
-                }
-                for (PersistenceUnitInfo persistenceUnitInfo : appInfo.persistenceUnits) {
-                    System.out.println("    PersistenceUnit(name=" + persistenceUnitInfo.name + ", provider=" + persistenceUnitInfo.provider+ ")");
-                    System.out.println("");
-                }
+            } catch (UndeployException e) {
+                System.out.println(messages.format("cmd.undeploy.failed", path));
+                e.printStackTrace(System.out);
+                exitCode++;
             } catch (DeploymentTerminatedException e) {
                 System.out.println(e.getMessage());
-                exitCode += 100;
+                exitCode++;
             } catch (ValidationFailedException e) {
                 System.out.println(messages.format("cmd.deploy.validationFailed", path));
                 int level = 2;
@@ -232,11 +220,17 @@
                 }
                 AppValidator appValidator = new AppValidator(level, false, true, false);
                 appValidator.printResults(e);
-                exitCode += 100;
+                exitCode++;
+                if (!delete(destFile)){
+                    System.out.println(messages.format("cmd.deploy.cantDelete.deploy", destFile.getAbsolutePath()));
+                }
             } catch (OpenEJBException e) {
                 System.out.println(messages.format("cmd.deploy.failed", path));
                 e.printStackTrace(System.out);
-                exitCode += 100;
+                exitCode++;
+                if (!delete(destFile)){
+                    System.out.println(messages.format("cmd.deploy.cantDelete.deploy", destFile.getAbsolutePath()));
+                }
             }
         }
 
@@ -245,6 +239,56 @@
         }
     }
 
+    private static void undeploy(boolean offline, File dest, String path, Deployer deployer) throws UndeployException, DeploymentTerminatedException {
+        if (offline) {
+            if (dest.exists()){
+                if (!delete(dest)){
+                    throw new DeploymentTerminatedException(messages.format("cmd.deploy.cantDelete.undeploy", dest.getAbsolutePath()));
+                }
+            }
+        } else {
+            try {
+                Undeploy.undeploy(path, dest, deployer);
+            } catch (NoSuchApplicationException nothingToUndeploy) {
+            }
+        }
+    }
+
+    private static void print(AppInfo appInfo) {
+        System.out.println("App(id=" + appInfo.jarPath + ")");
+
+        for (EjbJarInfo info : appInfo.ejbJars) {
+            System.out.println("    EjbJar(id=" + info.moduleId + ", path=" + info.jarPath + ")");
+            for (EnterpriseBeanInfo beanInfo : info.enterpriseBeans) {
+                System.out.println("        Ejb(ejb-name=" + beanInfo.ejbName + ", id=" + beanInfo.ejbDeploymentId + ")");
+                for (String name : beanInfo.jndiNames) {
+                    System.out.println("            Jndi(name=" + name + ")");
+                }
+                System.out.println("");
+            }
+            for (InterceptorInfo interceptorInfo : info.interceptors) {
+                System.out.println("        Interceptor(class=" + interceptorInfo.clazz + ")");
+            }
+            System.out.println("");
+        }
+        for (ClientInfo clientInfo : appInfo.clients) {
+            System.out.println("    Client(main-class=" + clientInfo.mainClass + ", id=" + clientInfo.moduleId + ", path=" + clientInfo.codebase + ")");
+            System.out.println("");
+        }
+        for (ConnectorInfo connectorInfo : appInfo.connectors) {
+            System.out.println("    Connector(id=" + connectorInfo.moduleId + ", path=" + connectorInfo.codebase + ")");
+            System.out.println("");
+        }
+        for (WebAppInfo webAppInfo : appInfo.webApps) {
+            System.out.println("    WebApp(context-root=" + webAppInfo.contextRoot + ", id=" + webAppInfo.moduleId + ", path=" + webAppInfo.codebase + ")");
+            System.out.println("");
+        }
+        for (PersistenceUnitInfo persistenceUnitInfo : appInfo.persistenceUnits) {
+            System.out.println("    PersistenceUnit(name=" + persistenceUnitInfo.name + ", provider=" + persistenceUnitInfo.provider+ ")");
+            System.out.println("");
+        }
+    }
+
     private static void checkSource(File file) throws DeploymentTerminatedException {
         if (!file.exists()) {
             throw new DeploymentTerminatedException(messages.format("cmd.deploy.fileNotFound", file.getAbsolutePath()));
@@ -310,7 +354,18 @@
         return false;
     }
         
-    private static File unpack(File jarFile, File destDir) throws OpenEJBException, DeploymentTerminatedException {
+    private static File unpack(File jarFile, File destinationDir) throws OpenEJBException, DeploymentTerminatedException {
+
+        try {
+            checkDest(destinationDir, jarFile);
+            JarExtractor.extract(jarFile, destinationDir);
+            return destinationDir;
+        } catch (IOException e) {
+            throw new OpenEJBException("Unable to extract jar. " + e.getMessage(), e);
+        }
+    }
+
+    private static File unpackedLocation(File jarFile, File destDir) {
         if (jarFile.isDirectory()) {
             return jarFile;
         }
@@ -322,15 +377,8 @@
             name += ".unpacked";
         }
 
-
-        try {
-            File destinationDir = new File(destDir, name);
-            checkDest(destinationDir, jarFile);
-            JarExtractor.extract(jarFile, destinationDir);
-            return destinationDir;
-        } catch (IOException e) {
-            throw new OpenEJBException("Unable to extract jar. " + e.getMessage(), e);
-        }
+        File destinationDir = new File(destDir, name);
+        return destinationDir;
     }
 
 

Modified: openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Undeploy.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Undeploy.java?rev=639085&r1=639084&r2=639085&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Undeploy.java (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/config/Undeploy.java Wed Mar 19 17:01:57 2008
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.config;
 
+import static org.apache.openejb.config.JarExtractor.delete;
+
 import java.util.Properties;
 import java.io.File;
 import java.io.IOException;
@@ -96,10 +98,10 @@
         } catch (javax.naming.ServiceUnavailableException e) {
             System.out.println(e.getCause().getMessage());
             System.out.println(Undeploy.messages.format("cmd.deploy.serverOffline"));
-            throw new SystemExitException(1);
+            throw new SystemExitException(-1);
         } catch (javax.naming.NamingException e) {
             System.out.println("DeployerEjb does not exist in server '" + serverUrl + "', check the server logs to ensure it exists and has not been removed.");
-            throw new SystemExitException(2);
+            throw new SystemExitException(-2);
         }
 
         int exitCode = 0;
@@ -107,39 +109,18 @@
             String moduleId = (String) obj;
 
             try {
-                boolean undeployed = false;
-
-                // Treat moduleId as a file path, and see if there is a matching app to undeploy
-                String path = null;
-                try {
-                    path = new File(moduleId).getCanonicalPath();
-                } catch (IOException e) {
-                }
-                if (path != null) {
-                    try {
-                        deployer.undeploy(path);
-                        undeployed = true;
-                    } catch (NoSuchApplicationException e) {
-                    }
-                }
-
-                // If that didn't work, undeploy using just the moduleId
-                if (!undeployed) {
-                    deployer.undeploy(moduleId);
-                }
-
-                // TODO make this message
-                System.out.println(messages.format("cmd.undeploy.successful", moduleId));
+                undeploy(moduleId, deployer);
+            } catch (DeploymentTerminatedException e) {
+                System.out.println(e.getMessage());
+                exitCode++;
             } catch (UndeployException e) {
-                // TODO make this message
-                // TODO Maybe brush up this excpetion handling
                 System.out.println(messages.format("cmd.undeploy.failed", moduleId));
                 e.printStackTrace(System.out);
-                exitCode += 100;
+                exitCode++;
             } catch (NoSuchApplicationException e) {
                 // TODO make this message
                 System.out.println(messages.format("cmd.undeploy.noSuchModule", moduleId));
-                exitCode += 100;
+                exitCode++;
             }
         }
 
@@ -148,6 +129,41 @@
         }
     }
 
+    public static void undeploy(String moduleId, Deployer deployer) throws UndeployException, NoSuchApplicationException, DeploymentTerminatedException {
+        // Treat moduleId as a file path, and see if there is a matching app to undeploy
+        undeploy(moduleId, new File(moduleId), deployer);
+    }
+
+    public static void undeploy(String moduleId, File file, Deployer deployer) throws UndeployException, NoSuchApplicationException, DeploymentTerminatedException {
+        try {
+            file = file.getCanonicalFile();
+        } catch (IOException e) {
+        }
+
+        boolean undeployed = false;
+        if (file != null) {
+            String path = file.getAbsolutePath();
+            try {
+                deployer.undeploy(path);
+                undeployed = true;
+                moduleId = path;
+                if (!delete(file)){
+                    throw new DeploymentTerminatedException(messages.format("cmd.deploy.cantDelete", file.getAbsolutePath()));
+                }
+            } catch (NoSuchApplicationException e) {
+            }
+        }
+
+        // If that didn't work, undeploy using just the moduleId
+        if (!undeployed) {
+            deployer.undeploy(moduleId);
+            System.out.println(messages.format("cmd.undeploy.nothingToDelete", moduleId));
+        }
+
+        // TODO make this message
+        System.out.println(messages.format("cmd.undeploy.successful", moduleId));
+    }
+
     private static void help(Options options) {
         HelpFormatter formatter = new HelpFormatter();
         formatter.printHelp("undeploy [options] <file> [<file>...]", "\n"+ Undeploy.i18n("cmd.undeploy.description"), options, "\n");
@@ -165,7 +181,8 @@
         return Undeploy.messages.format(key);
     }
 
-    public static class DeploymentTerminatedException extends Exception {
+
+    public static class DeploymentTerminatedException extends Deploy.DeploymentTerminatedException {
 
         private static final long serialVersionUID = 1L;
 

Modified: openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java?rev=639085&r1=639084&r2=639085&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java Wed Mar 19 17:01:57 2008
@@ -831,7 +831,7 @@
                     buffer.append("\\r");
                     break;
                 default:
-                    if ("\\#!=:".indexOf(ch) >= 0 || (key && ch == ' '))
+                    if ("\\".indexOf(ch) >= 0 || (key && "#!=: ".indexOf(ch) >= 0))
                     {
                         buffer.append('\\');
                     }

Modified: openejb/branches/openejb-3.0/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties?rev=639085&r1=639084&r2=639085&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties Wed Mar 19 17:01:57 2008
@@ -33,6 +33,9 @@
 #System.out.println(messages.format("cmd.undeploy.noSuchModule", moduleId));
 cmd.undeploy.noSuchModule = Module with moduleId \"{0}\" does not exist.
 
+##System.out.println(messages.format("cmd.undeploy.nothingToDelete", moduleId));
+cmd.undeploy.nothingToDelete = Nothing to delete.
+
 #Deploy
 cmd.deploy.description = Connects to the server and deploys the application.  Note that full remote deployment is not yet supported, deployment can only be done on the same machine as the server.  Track OPENEJB-609 for development of full remote deployment feature.\n\nOptions:
 
@@ -57,6 +60,9 @@
 # options.addOption(option(null, "dir", "cmd.deploy.opt.dir"));
 cmd.deploy.opt.dir = Sets the destination directory where the app will be deployed.  The default is {openejb.base}/apps/ directory.  Note when changing this setting make sure the directory is listed in the openejb.xml via a <Deployments dir=""/> tag or the app will not be picked up again on restart.
 
+# options.addOption(option("u", "undeploy", "cmd.deploy.opt.undeploy"));
+cmd.deploy.opt.undeploy = Undeploys the app if deployed and/or deletes the file if it already exists in the server's apps/ directory.
+
 # System.out.println(messages.format("cmd.deploy.serverOffline"));
 cmd.deploy.serverOffline =  The server is offline or not contactable at the configured address.  Either start the server or try deployment again in --offline mode.
 
@@ -80,6 +86,12 @@
 
 # throw new DeploymentTerminatedException(messages.format("cmd.deploy.cantCopy", file.getAbsolutePath(), destFile.getAbsolutePath()));
 cmd.deploy.cantCopy = Unable to copy application to \"{1}\".  Check that the directory is writable and that there is enough disk space.
+
+# System.out.println(messages.format("cmd.deploy.cantDelete.deploy", destFile.getAbsolutePath()));
+cmd.deploy.cantDelete.deploy = Unable to delete failed deployment file "{0}"
+
+# System.out.println(messages.format("cmd.deploy.cantDelete.undeploy", destFile.getAbsolutePath()));
+cmd.deploy.cantDelete.undeploy = Unable to delete existing deployment file "{0}"
 
 # EnvEntriesPropertiesDeployer
 # debug("envprops.override", componentName, entry.getName(), entry.getEnvEntryValue(), newEntry.getEnvEntryValue());

Modified: openejb/branches/openejb-3.0/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java?rev=639085&r1=639084&r2=639085&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java Wed Mar 19 17:01:57 2008
@@ -21,6 +21,7 @@
 import java.io.ByteArrayOutputStream;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Properties;
 
 public class SuperPropertiesTest extends PropertiesTest {
 
@@ -187,7 +188,7 @@
         assertEquals("    #  foo comment\n    #  @name=value\n\n    foo=bar\n\n    number=42\n", store(properties));
 
         properties.getAttributes("foo").put("name", null);
-        assertEquals("    #  foo comment\n    #  @name\n\n    foo=bar\n\n    number=42\n", store(properties));        
+        assertEquals("    #  foo comment\n    #  @name\n\n    foo=bar\n\n    number=42\n", store(properties));
 
         properties.getAttributes("foo").put("name", "");
         assertEquals("    #  foo comment\n    #  @name\n\n    foo=bar\n\n    number=42\n", store(properties));