[izpack-changes] r1490 - izpack-src/trunk/src/lib/com/izforge/izpack/compiler

noreply at berlios.de noreply at berlios.de
Thu Jul 13 22:57:09 CEST 2006


Author: aikebah
Date: 2006-07-13 22:57:06 +0200 (Thu, 13 Jul 2006)
New Revision: 1490

Modified:
   izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java
Log:
Implemented check to prevent System properties overwrite

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java	2006-07-12 07:50:51 UTC (rev 1489)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/compiler/Compiler.java	2006-07-13 20:57:06 UTC (rev 1490)
@@ -296,15 +296,17 @@
     }
 
     /**
-     * Add a name value pair to the project property set. Overwriting any existing value.
+     * Add a name value pair to the project property set. Overwriting any existing value except system properties.
      * 
      * @param name the name of the property
      * @param value the value to set
-     * @return true
+     * @return an indicator if the name value pair was added.
      */
     public boolean setProperty(String name, String value)
     {
-        // TODO: don't allow overwriting of system properties
+        if (System.getProperties().containsKey(name)) {
+            return false;
+        }
         properties.put(name, value);
         return true;
     }




More information about the izpack-changes mailing list