Update of /var/cvs/src/org/mmbase/datatypes
In directory james.mmbase.org:/tmp/cvs-serv16171
Modified Files:
Tag: MMBase-1_8
ComparableDataType.java
Log Message:
MMB-1642
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/datatypes
See also: http://www.mmbase.org/jira/browse/MMB-1642
Index: ComparableDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/ComparableDataType.java,v
retrieving revision 1.21.2.2
retrieving revision 1.21.2.3
diff -u -b -r1.21.2.2 -r1.21.2.3
--- ComparableDataType.java 20 Sep 2007 13:23:06 -0000 1.21.2.2
+++ ComparableDataType.java 24 Apr 2008 11:43:34 -0000 1.21.2.3
@@ -22,7 +22,7 @@
* therefore can have a minimum and a maximum value.
*
* @author Michiel Meeuwissen
- * @version $Id: ComparableDataType.java,v 1.21.2.2 2007/09/20 13:23:06
michiel Exp $
+ * @version $Id: ComparableDataType.java,v 1.21.2.3 2008/04/24 11:43:34
michiel Exp $
* @since MMBase-1.8
*/
public abstract class ComparableDataType extends BasicDataType {
@@ -104,11 +104,11 @@
*
* If the default value of comparable datatype is somewhy out the range,
it will be truncated into it.
*/
- public final Object getDefaultValue() {
- Object def = super.getDefaultValue();
- if (! minRestriction.valid(def, null, null)) {
+ public final Object getDefaultValue(Locale locale, Cloud cloud, Field
field) {
+ Object def = super.getDefaultValue(locale, cloud, field);
+ if (! minRestriction.valid(def, null, field)) {
def = minRestriction.getValue();
- } else if (! maxRestriction.valid(def, null, null)) {
+ } else if (! maxRestriction.valid(def, null, field)) {
def = maxRestriction.getValue();
}
return def;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs