JAL-2797 added constructor including embedded/standalone boolean
[jalview.git] / forester / java / src / org / forester / util / CommandLineArguments.java
index 31a50c9..f75eb69 100644 (file)
@@ -93,7 +93,7 @@ public final class CommandLineArguments {
         if ( o.containsKey( option_name ) ) {
             final String value = o.get( option_name );
             if ( !ForesterUtil.isEmpty( value ) ) {
-                return value;
+                return value.replaceAll( "\\s+", " " ).trim();
             }
             else {
                 throw new IllegalArgumentException( "value for \"" + option_name + "\" is not set" );
@@ -106,7 +106,7 @@ public final class CommandLineArguments {
 
     /**
      * Removes quotes
-     * 
+     *
      */
     public String getOptionValueAsCleanString( final String option_name ) throws IllegalArgumentException {
         return getOptionValue( option_name ).replaceAll( "\"", "" ).replaceAll( "\'", "" );
@@ -224,7 +224,7 @@ public final class CommandLineArguments {
             //  }
             if ( getAllOptions().containsKey( key ) ) {
                 throw new IllegalArgumentException( "attempt to set option \"" + key + "\" mutiple times [" + option
-                        + "]" );
+                                                    + "]" );
             }
             options_map.put( key, value );
         }