Author: toad
Date: 2008-04-23 14:50:55 +0000 (Wed, 23 Apr 2008)
New Revision: 19532

Modified:
   trunk/freenet/src/freenet/config/WrapperConfig.java
Log:
If written successfully, show the new value.

Modified: trunk/freenet/src/freenet/config/WrapperConfig.java
===================================================================
--- trunk/freenet/src/freenet/config/WrapperConfig.java 2008-04-23 14:48:42 UTC 
(rev 19531)
+++ trunk/freenet/src/freenet/config/WrapperConfig.java 2008-04-23 14:50:55 UTC 
(rev 19532)
@@ -9,6 +9,7 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
+import java.util.HashMap;
 
 import org.tanukisoftware.wrapper.WrapperManager;
 
@@ -23,7 +24,13 @@
  */
 public class WrapperConfig {
 
+       private static HashMap overrides = new HashMap();
+       
        public static String getWrapperProperty(String name) {
+               synchronized(WrapperConfig.class) {
+                       if(overrides.containsKey(name))
+                               return (String) overrides.get(name);
+               }
                return WrapperManager.getProperties().getProperty(name, null);
        }
        
@@ -145,7 +152,8 @@
                                }
                        }
                }
-               WrapperManager.getProperties().setProperty(name, value);
+               // Wrapper properties are read-only, so don't setProperty().
+               overrides.put(name, value);
                return true;
        }
        

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to