diff --git a/src/helma/objectmodel/Property.java b/src/helma/objectmodel/Property.java index 5dc82fe3..5c8df5c7 100644 --- a/src/helma/objectmodel/Property.java +++ b/src/helma/objectmodel/Property.java @@ -64,7 +64,7 @@ public final class Property implements IProperty, Serializable { return null; } - public void setStringValue (String value) throws ParseException { + public void setStringValue (String value) { if (type == NODE) this.nvalue = null; if (type == JAVAOBJECT) @@ -116,6 +116,7 @@ public final class Property implements IProperty, Serializable { this.nvalue = value; } + public void setJavaObjectValue (Object value) { if (type == NODE) this.nvalue = null; @@ -124,7 +125,6 @@ public final class Property implements IProperty, Serializable { } - public String getStringValue () { switch (type) { case STRING: @@ -151,32 +151,32 @@ public final class Property implements IProperty, Serializable { } public long getIntegerValue () { - if (type == INTEGER) + if (type == INTEGER) return lvalue; return 0; } public double getFloatValue () { - if (type == FLOAT) + if (type == FLOAT) return dvalue; return 0.0; } public Date getDateValue () { - if (type == DATE) + if (type == DATE) return new Date (lvalue); return null; } public boolean getBooleanValue () { - if (type == BOOLEAN) + if (type == BOOLEAN) return bvalue; return false; } public INode getNodeValue () { - if (type == NODE) + if (type == NODE) return nvalue; return null; } diff --git a/src/helma/objectmodel/TransientNode.java b/src/helma/objectmodel/TransientNode.java index 9965e7e8..2c453e0e 100644 --- a/src/helma/objectmodel/TransientNode.java +++ b/src/helma/objectmodel/TransientNode.java @@ -469,12 +469,8 @@ public class TransientNode implements INode, Serializable { public void setString (String propname, String value) { // IServer.getLogger().log ("setting String prop"); Property prop = initProperty (propname); - try { - prop.setStringValue (value); - // Server.throwNodeEvent (new NodeEvent (this, NodeEvent.PROPERTIES_CHANGED)); - } catch (java.text.ParseException x) { - throw new RuntimeException ("Fehler beim Parsen des Datum-Strings"); - } + prop.setStringValue (value); + // Server.throwNodeEvent (new NodeEvent (this, NodeEvent.PROPERTIES_CHANGED)); lastmodified = System.currentTimeMillis (); }