diff --git a/src/org/hwo/configuration/ConfigurableObjects.java b/src/org/hwo/configuration/ConfigurableObjects.java index b4a113c..682c860 100644 --- a/src/org/hwo/configuration/ConfigurableObjects.java +++ b/src/org/hwo/configuration/ConfigurableObjects.java @@ -1,5 +1,7 @@ package org.hwo.configuration; +import static org.hwo.logging.Logging.log; +import static org.hwo.logging.LogLevel.*; import java.io.ObjectInputStream.GetField; import java.lang.reflect.Field; import java.util.Enumeration; @@ -7,6 +9,9 @@ import java.util.Hashtable; import java.util.LinkedList; import java.util.StringTokenizer; +import org.hwo.ByteArrayHelper; +import org.hwo.ByteArrayHexlifier; + public class ConfigurableObjects { public static Field[] getConfigurableAttributes(Class clazz){ @@ -37,15 +42,12 @@ public class ConfigurableObjects { public static String getValueAsString(Object value){ String s = value.toString(); - - s = s.replaceAll("\\\\","\\\\\\\\"); - s = s.replaceAll("\\;", "\\\\;"); - s = s.replaceAll("\\|", "\\\\|"); - - return s; + return ByteArrayHexlifier.hexlify(s); } - public static Object getValueFromString(String value,Class type) throws ClassCastException{ + public static Object getValueFromString(String _value,Class type) throws ClassCastException{ + + String value = ByteArrayHexlifier.unhexlify(_value); if (type.equals(String.class)) return new String(value); if (type.equals(Integer.class)) @@ -121,11 +123,15 @@ public class ConfigurableObjects { Hashtable hash = new Hashtable(); for (int n=0;n