minor refactor to linearize document entry logic
@@ -101,24 +101,29 @@ public class ODocumentEntry {
}
public void removeTimeline() {
- if (!(value instanceof OTrackedMultiValue)) return;
+ if (value instanceof OTrackedMultiValue) {
((OTrackedMultiValue) value).disableTracking(null);
}
+ }
public void replaceListener(ODocument document, Object oldValue) {
enableTracking(document);
}
public boolean enableTracking(ODocument document) {
- if (!(value instanceof OTrackedMultiValue)) return false;
+ if (value instanceof OTrackedMultiValue) {
((OTrackedMultiValue) value).enableTracking(document);
return true;
+ } else {
+ return false;
+ }
}
public void disableTracking(ODocument document, Object fieldValue) {
- if (!(fieldValue instanceof OTrackedMultiValue)) return;
+ if (fieldValue instanceof OTrackedMultiValue) {
((OTrackedMultiValue) fieldValue).disableTracking(document);
}
+ }
public boolean isTrackedModified() {
if (value instanceof OTrackedMultiValue) {
