jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-434) ArrayIndexOutOfBoundsException in NodeTypeDefDiff
Date Fri, 26 May 2006 09:58:30 GMT
    [ http://issues.apache.org/jira/browse/JCR-434?page=comments#action_12413418 ] 

Jukka Zitting commented on JCR-434:
-----------------------------------

Merged for 1.0.1 in revision 409617.

> 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


Mime
View raw message