[ http://issues.apache.org/jira/browse/JCR-434?page=all ]
Jukka Zitting updated JCR-434:
------------------------------
Fix Version: 1.0.1
Version: 1.0
> ArrayIndexOutOfBoundsException in NodeTypeDefDiff
> -------------------------------------------------
>
> Key: JCR-434
> URL: http://issues.apache.org/jira/browse/JCR-434
> Project: Jackrabbit
> Type: Bug
> Components: nodetype
> Versions: 1.0
> Reporter: Michael Daglian
> Assignee: Stefan Guggisberg
> Priority: Minor
> Fix For: 1.0.1
>
> 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