axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12478] - ArrayIndexOutOfBoundsException in ParamReader
Date Tue, 10 Sep 2002 15:23:03 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12478>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12478

ArrayIndexOutOfBoundsException in ParamReader





------- Additional Comments From thomas@boerkel.de  2002-09-10 15:23 -------
OK, my workaround from the Axis Dev mailinglist had a little fault, so it made 
problems in other classes. This is the correct version:

Change line 197 in ParamReader.java from
            if (names != null) {
to
            if (names != null && index < 2 * len) {

I do not think anymore, that this is a JDK bug. In the LocalVarTable seem to be 
only variables, that have an assigned initial value. So, the index of the 
variables in the table can be much higher than the length of the table, thus 
the ArrayIndexOutOfBoundsException.
I do not know, why javac sometimes also lists uninitialized variables in that 
table, but it does and that does not mean that this is no bug in Axis.

So, if Axis really only needs the parameter variables, then my workaround is 
really a fix. If Axis needs all local variables (for the sake of completeness), 
then readLocalVariableTable() should use a Vector instead of a fixed array to 
read the local variables.

Mime
View raw message