Summary: | Varargs causes a NullPointerException | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Pekka Enberg <penberg> |
Component: | Compiler | Assignee: | Andrew Clement <aclement> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 1.5.0M5 | ||
Target Milestone: | 1.5.0RC1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Pekka Enberg
2005-12-14 03:53:43 EST
Looks like a bug in the underlying compiler - we took a cut of the eclipse compiler for 3.1 and I can see the code in that area appears to have changed since we took a cut. The NPE is because we are traversing an array of length 4 with only 3 things in it - representing the 3 parameters to the method. It is length 4 because of the way the compiler chooses to double its capacity as it processes. you can get rid of the error by passing a 4th parameter ;) Right - we probably need to upgrade to the latest JDT compiler version (3.1.1) but we aren't going to do that for 1.5.0 final. So, I've put in a fix to sort out the growing of the array, it now grows by 1 and fills each slot rather than doubling in size when it gets full and other consumers downstream then not being able to rely on its size to indicate how much of it is full. Fix is checked in . waiting on build. thanks for the clear bug report :) fix available. |