From a54344d79a619e9a0db2a8f323641639b2ae7cbd Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 1 Nov 2002 21:45:03 +0000 Subject: [PATCH] Removed obsolete adoptName field --- src/helma/objectmodel/TransientNode.java | 4 +--- src/helma/objectmodel/db/Node.java | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/helma/objectmodel/TransientNode.java b/src/helma/objectmodel/TransientNode.java index 96e5cab4..43e90e4d 100644 --- a/src/helma/objectmodel/TransientNode.java +++ b/src/helma/objectmodel/TransientNode.java @@ -44,8 +44,6 @@ public class TransientNode implements INode, Serializable { transient DbMapping dbmap; - transient boolean adoptName = true; // little helper to know if this node is being converted - private static long idgen = 0; public static String generateID () { @@ -549,7 +547,7 @@ public class TransientNode implements INode, Serializable { // or as an anonymous node in a collection if (value instanceof TransientNode) { TransientNode n = (TransientNode) value; - if (n.parent == null && n.adoptName) { + if (n.parent == null) { n.name = propname; n.parent = this; n.anonymous = false; diff --git a/src/helma/objectmodel/db/Node.java b/src/helma/objectmodel/db/Node.java index f65b8c79..50e16cda 100644 --- a/src/helma/objectmodel/db/Node.java +++ b/src/helma/objectmodel/db/Node.java @@ -162,9 +162,6 @@ public final class Node implements INode, Serializable { transient private volatile Transactor lock; transient private int state; - // transient String nameProp; // the name of the property which defines the name of this node. - transient boolean adoptName = true; // little helper to know if this node is being converted - static final long serialVersionUID = -3740339688506633675L; /** @@ -230,7 +227,6 @@ public final class Node implements INode, Serializable { id = null; this.name = n == null ? "" : n; created = lastmodified = System.currentTimeMillis (); - adoptName = true; state = TRANSIENT; } @@ -1698,7 +1694,7 @@ public final class Node implements INode, Serializable { // check if the main identity of this node is as a named property // or as an anonymous node in a collection - if (n.parentHandle == null && n.adoptName && !"root".equalsIgnoreCase (n.getPrototype ())) { + if (n.parentHandle == null && !"root".equalsIgnoreCase (n.getPrototype ())) { n.setParent (this); n.name = propname; n.anonymous = false;