jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Daglian (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-434) ArrayIndexOutOfBoundsException in NodeTypeDefDiff
Date Mon, 15 May 2006 20:25:05 GMT
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"

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:
For more information on JIRA, see:

View raw message