fix Bug TDI-18966: Never change the original lookup information object state

git-svn-id: http://talendforge.org/svn/tos/trunk@79598 f6f1c999-d317-4740-80b0-e6d1abc6f99e
This commit is contained in:
wwang
2012-03-12 03:46:39 +00:00
parent 761831a8ed
commit ec37fa99eb
2 changed files with 37 additions and 12 deletions

View File

@@ -67,6 +67,12 @@ public class Document implements java.io.Serializable{
docToFlat.setOriginalLoop(loopXPath);
docToFlat.setXmlNameSpaceMap(nsMapping);
docToFlat.flatForLookup();
if(docToFlat.isLoopChanged()) {//never change the original lookup information object state
lookupInfo = docToFlat.getLookupInfo();
xpathOfResults = docToFlat.getXpathOfResults();
xpathToTypeMap = docToFlat.getXpathToTypeMap();
xpathToPatternMap = docToFlat.getXpathToPatternMap();
}
java.util.List<org.dom4j.tree.AbstractNode> nodes = docToFlat.getNodes();
for (org.dom4j.tree.AbstractNode node : nodes) {
@@ -111,8 +117,6 @@ public class Document implements java.io.Serializable{
}
}
//reset lookup info
lookupInfo.clear();
//set resultset
int count = result.size();
if(count>0) {