From: Aron Roberts Date: Fri, 25 Jun 2010 22:53:25 +0000 (+0000) Subject: CSPACE-2242: Corrected several variable names to properly indicate node hierarchy. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=28ffe56a52143413d2fbcf96fb65121ffdf70481;p=tmp%2Fjakarta-migration.git CSPACE-2242: Corrected several variable names to properly indicate node hierarchy. --- diff --git a/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java b/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java index cb0e77ff6..9a261a095 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java +++ b/services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java @@ -314,11 +314,11 @@ public class DocumentUtils { private static Object getMultiValues(Node node) throws Exception { Object result = null; - Node child = removeTextNodes(node); - NodeList grandChildren = child.getChildNodes(); - for (int j = 0; j < grandChildren.getLength(); j++) { + Node nodeWithoutTextNodes = removeTextNodes(node); + NodeList children = nodeWithoutTextNodes.getChildNodes(); + for (int j = 0; j < children.getLength(); j++) { - Node grandChild = grandChildren.item(j).getFirstChild(); + Node grandChild = children.item(j).getFirstChild(); // If any grandchild is non-null, return values for all grandchildren. if (grandChild != null) {