Update of /var/cvs/src/org/mmbase/datatypes
In directory james.mmbase.org:/tmp/cvs-serv4839
Modified Files:
BasicDataType.java
Log Message:
If a datatype is finished again, then don't wrap the unmodifiable map again
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/datatypes
Index: BasicDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/BasicDataType.java,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- BasicDataType.java 4 Nov 2008 21:11:40 -0000 1.100
+++ BasicDataType.java 6 Nov 2008 13:31:32 -0000 1.101
@@ -40,7 +40,7 @@
* @author Pierre van Rooden
* @author Michiel Meeuwissen
* @since MMBase-1.8
- * @version $Id: BasicDataType.java,v 1.100 2008/11/04 21:11:40 michiel Exp $
+ * @version $Id: BasicDataType.java,v 1.101 2008/11/06 13:31:32 michiel Exp $
*/
public class BasicDataType<C> extends AbstractDescriptor implements
DataType<C>, Comparable<DataType<C>>, Descriptor {
@@ -304,6 +304,7 @@
// e.g. if origin is Date, but actual type is integer, then
casting of 'today' works now.
value = origin.cast(value, node, field);
}
+ if (value == null) return null;
Cloud cloud = getCloud(getCloud(node, field));
try {
return cast(value, cloud, node, field);
@@ -468,8 +469,10 @@
*/
public void finish(Object owner) {
this.owner = owner;
+ if (! isFinished()) {
handlers = Collections.unmodifiableMap(handlers);
}
+ }
/**
* [EMAIL PROTECTED]
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs