ArrayIndexOutOfBoundsException in NodeTypeDefDiff
-------------------------------------------------
Key: JCR-434
URL: http://issues.apache.org/jira/browse/JCR-434
Project: Jackrabbit
Type: Bug
Components: nodetype
Reporter: Michael Daglian
Priority: Minor
It appears that the code for building diffs in child node definitions loops
incorrectly, opening the possibility for an ArrayIndexOutOfBounds exception.
The offending portion is in the "buildChildNodeDefDiffs" method:
<<
NodeDef[] cnda2 = newDef.getChildNodeDefs();
HashMap defs2 = new HashMap();
for (int i = 0; i < cnda1.length; i++) {
defs2.put(cnda2[i].getId(), cnda2[i]);
}
>>
It seems like simply changing the length check to be cnda2 (as it is in
"buildPropDefsDiff") would suffice.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira