Update of /var/cvs/src/org/mmbase/module/core
In directory james.mmbase.org:/tmp/cvs-serv30034
Modified Files:
MMObjectNode.java
Log Message:
MMB-1628
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/core
See also: http://www.mmbase.org/jira/browse/MMB-1628
Index: MMObjectNode.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/core/MMObjectNode.java,v
retrieving revision 1.213
retrieving revision 1.214
diff -u -b -r1.213 -r1.214
--- MMObjectNode.java 3 Feb 2008 17:33:57 -0000 1.213
+++ MMObjectNode.java 19 Mar 2008 09:53:35 -0000 1.214
@@ -38,7 +38,7 @@
* @author Eduard Witteveen
* @author Michiel Meeuwissen
* @author Ernst Bunders
- * @version $Id: MMObjectNode.java,v 1.213 2008/02/03 17:33:57 nklasens Exp $
+ * @version $Id: MMObjectNode.java,v 1.214 2008/03/19 09:53:35 michiel Exp $
*/
public class MMObjectNode implements org.mmbase.util.SizeMeasurable,
java.io.Serializable {
@@ -125,6 +125,9 @@
private String newContext = null;
+ private static long seq = 0;
+ public long sequence = seq++;
+
/**
* Default Main constructor, creates a node that is new and not (yet) in
storage.
* @param parent the node's parent, an instance of the node's builder.
@@ -583,13 +586,14 @@
// process the changed value (?)
if (parent != null) {
if(!parent.setValue(this, fieldName, originalValue)) {
- // setValue of parent returned false, no update needed...
+ log.debug("setValue of parent returned false, no update
needed...");
return false;
}
} else {
log.error("parent was null for node with number" + getNumber());
}
setUpdate(fieldName);
+ log.debug("" + sequence + getChanged());
return true;
}
@@ -632,10 +636,13 @@
// add it to the changed vector so we know that we have to update it
// on the next commit
if (! initializing && state != Field.STATE_VIRTUAL) {
+ log.trace("Marking '" + fieldName + "' as changed in " + sequence);
changed.add(fieldName);
}
// is it a memory only field ? then send a fieldchange
- if (state == 0) sendFieldChangeSignal(fieldName);
+ if (state == 0) {
+ sendFieldChangeSignal(fieldName);
+ }
}
/**
@@ -668,12 +675,7 @@
if (field != null && field.getType() == Field.TYPE_NODE) {
return getIntValue(fieldName) <= -1;
}
- Object value = values.get(fieldName);
- if (VALUE_SHORTED.equals(value)) {
- // value is not loaded from the database. We have to check the
database to be sure.
- value = getValue(fieldName);
- }
- return value == null;
+ return values.get(fieldName) == null;
} else {
return true;
}
@@ -707,9 +709,11 @@
default:
throw new UnsupportedOperationException("Found shorted
value for type " + type);
}
+ if (getSize(fieldName) < blobs.getMaxEntrySize()) {
blobs.put(key, value);
}
}
+ }
// if we have an XML-dbtype field, we always have to return a Document
(or null).
// note that if the value is null we store it as a null value
@@ -870,7 +874,7 @@
}
public InputStream getInputStreamValue(String fieldName) {
- Object value = getValue(fieldName);
+ Object value = values.get(fieldName); // don't use getValue here,
it'll introduce MMB-1628
if (value == null) {
checkFieldExistance(fieldName);
log.debug("NULL on " + fieldName + " " + this, new Exception());
@@ -1223,6 +1227,8 @@
log.error("MMObjectNode -> can't get parent");
return "problem";
}
+ //return "" + getFunctionValue("gui", null); // proposed fix for
MMB-1575. No good, it can
+ //cause infinite loops.
}
/**
@@ -1425,7 +1431,7 @@
* @return always <code>true</code>
*/
public boolean sendFieldChangeSignal(String fieldName) {
- return parent.sendFieldChangeSignal(this,fieldName);
+ return parent.sendFieldChangeSignal(this, fieldName);
}
/**
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs