From: Aaron A. <aa...@cb...> - 2008-11-17 22:49:14
|
EqualitySplitterBuilder was already commented out in the CVS. InequalitySplitterBuilder (or other code) has a bug that results in not setting cutIndex (leaving it as -1). The current code if (cutIndex==-1) { cutIndex=-1; System.out.println(this); } is not good (in the sense that it does not fix the problem) but it does give a more informative print-out prior to dying from the ArrayIndexOutOfBoundsException. To make this clearer for future readers, the code has been changed to if (cutIndex==-1) { System.out.println(this); } If you have a reproducible case where cutIndex is -1, you may be able to track down the cause of the bug. Thanks for the attention to detail and let us know if you find anything else! Aaron On Sun, 16 Nov 2008, Nathan Silberman wrote: > I just downloaded the latest src of Jboost and found 2 possible bugs: > > 1. EqualitySplitterBuilder > this file imports "import sun.tools.tree.CastExpression;" which it doesn't > use. Additinoally, the ant script doesn't specify that this jar file should > be pulled in from anywhere so this import should really be removed to avoid > compilation problems. > > 2. InequalitySplitterBuilder > Starting on line 251, there is a dubious assignment: > > if (cutIndex==-1) { > cutIndex=-1; > System.out.println(this); > } > > did somebody mean to reassign cutIndex to 1 instead?: > > if (cutIndex==-1) { > cutIndex=1; // possible correction? > System.out.println(this); > } > > The current code causes an ArrayIndexOutOfBoundsException > > Nathan > |