Author: breed
Date: Fri May 22 19:02:04 2009
New Revision: 777658

URL: http://svn.apache.org/viewvc?rev=777658&view=rev
Log:
ZOOKEEPER-192.  trailing whitespace in config file can cause number format 
exceptions

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=777658&r1=777657&r2=777658&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri May 22 19:02:04 2009
@@ -96,6 +96,8 @@
 
   ZOOKEEPER-385. crctest failed on hudson patch test (mahadev via phunt)
 
+  ZOOKEEPER-192.  trailing whitespace in config file can cause number format 
exceptions (phunt via breed)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java?rev=777658&r1=777657&r2=777658&view=diff
==============================================================================
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
 Fri May 22 19:02:04 2009
@@ -103,8 +103,8 @@
     protected void parseProperties(Properties zkProp)
     throws IOException, ConfigException {
         for (Entry<Object, Object> entry : zkProp.entrySet()) {
-            String key = entry.getKey().toString();
-            String value = entry.getValue().toString();
+            String key = entry.getKey().toString().trim();
+            String value = entry.getValue().toString().trim();
             if (key.equals("dataDir")) {
                 dataDir = value;
             } else if (key.equals("dataLogDir")) {


Reply via email to