jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Razvanica <mos_februa...@yahoo.fr>
Subject ArrayIndexOutOfBoundsException in generic.PUTFIELD
Date Mon, 25 May 2009 17:50:17 GMT

Hello all,

Here's my problem. I am trying to make some network simulations using a tool
called JiST/SWANS. This simulator has been written for Java 1.4 and, for my
simulations, I would like to use some 1.5 features, like genericity. 

So what I am trying to do is to compile the original code with the "source
-1.5" tag instead of the "source -1.4" tag. The problem is that the
simulator uses bcel to rewrite the bytecode so that JVM could be used for
simulations. The bcel library in the release doesn't work with the "source
-1.5" tag so I replace it with bcel-5.2. I made 2 minor modifications to the
original code :
- I have added an implementation of getClassPath in a class that implements
org.apache.bcel.util.Repository. This class just returns null, just like in
- In a class using org.apache.bcel.Repository.lookupClass() I am now
throwing java.lang.ClassNotFoundException 

These 2 modifications shouldn't change anything as far as I understand the
application. And when I compile the new code with the "-source 1.4" tag, it
doesn,t change anything. Everything compiles and works just fine. However,
when I compile the new code with the "-source 1.5" tag the compilation goes
smoothly, but, at runtime, the rewriter throws an

This happens every time org.apache.bcel.generic.PUTFIELD.accept is called:
java.lang.ArrayIndexOutOfBoundsException: -1 
   at java.util.ArrayList.remove(ArrayList.java:390)
   at org.apache.bcel.generic.PUTFIELD.accept(PUTFIELD.java:78)

Does anybody have any idea what happens and if there's something I could do
to fix this?

Thank you.
View this message in context: http://www.nabble.com/ArrayIndexOutOfBoundsException-in-generic.PUTFIELD-tp23710707p23710707.html
Sent from the BCEL - User mailing list archive at Nabble.com.

To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org

View raw message