* Extract cache insertion code into new private registerNewNode() method.
* Delay onInit() invocation until after the node has been registered with the cache. Two advantages: first, we won't call onInit() on nodes that are bound to be thrown away because a clone already exists in the cache, and second no need to cache nodes in the transactor clean node map, which was troublesome in exactly the same case. * Remove some old code that has been commented out for ages.
This commit is contained in:
parent
d843138386
commit
414b22836b
3 changed files with 78 additions and 148 deletions
|
@ -198,9 +198,7 @@ public final class XmlDatabaseReader extends DefaultHandler implements XmlConsta
|
|||
*/
|
||||
public void endElement(String namespaceURI, String localName, String qName)
|
||||
throws SAXException {
|
||||
if ("hopobject".equals(qName) && currentNode != null) {
|
||||
currentNode.invokeOnInit();
|
||||
} else if (elementType != null) {
|
||||
if (elementType != null) {
|
||||
Property prop = new Property(elementName, currentNode);
|
||||
String charValue = charBuffer.toString();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue