Permalink
Browse files

[HHQ-3367] Trim whitespace from properties included in client.propert…

…ies.
  • Loading branch information...
Ryan Morgan
Ryan Morgan committed Aug 31, 2009
1 parent d45f424 commit 52094065cbf1b94636f0e8563aaeb50af5eb7754
Showing with 10 additions and 0 deletions.
  1. +2 −0 ChangeLog
  2. +8 −0 src/org/hyperic/hq/hqapi1/tools/Command.java
View
@@ -1,6 +1,8 @@
Changes in HQApi 3.0
+ *) [HHQ-3367] Trim whitespace from properties included in client.properties.
+
*) [HHQ-3284] Add EventApi for gathering events globally or by resource.
*) [HHQ-3274] If a password is not given on the command line or via the
@@ -40,6 +40,7 @@
import java.io.IOException;
import java.util.Arrays;
import java.util.Properties;
+import java.util.Enumeration;
public abstract class Command {
@@ -142,6 +143,13 @@ private Properties getClientProperties(String file) {
return props;
}
}
+
+ // Trim property values
+ for (Enumeration e = props.propertyNames(); e.hasMoreElements(); ) {
+ String prop = (String)e.nextElement();
+ props.setProperty(prop, props.getProperty(prop).trim());
+ }
+
return props;
}

0 comments on commit 5209406

Please sign in to comment.