You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/08/26 11:56:45 UTC
[jira] [Comment Edited] (BCEL-221) BCELifier is not working for
Java8Example
[ https://issues.apache.org/jira/browse/BCEL-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14712696#comment-14712696 ]
Sebb edited comment on BCEL-221 at 8/26/15 9:56 AM:
----------------------------------------------------
Yes, the ID class is a currently a subclass of ConstantCP which was originally for the Fieldref, Methodref, InterfaceMethodref constants
That does not work properly; ID has 2 parameters but they are not class_index and name_and_type_index as ConstantCP expects.
They are bootstrap_method_attr_index and name_and_type_index instead, and the former is 0-based unlike class_index which is why the crash occurs
It looks like the intention in BCEL-209 was to share code, but the InvokeDynamic instruction is not really compatible
was (Author: sebb@apache.org):
Yes, the ID class is a currently a subclass of ConstantCP which was originally for the Fieldref, Methodref, InterfaceMethodref constants
That's wrong; ID has 2 parameters but they are not class_index and name_and_type_index as ConstantCP expects
> BCELifier is not working for Java8Example
> -----------------------------------------
>
> Key: BCEL-221
> URL: https://issues.apache.org/jira/browse/BCEL-221
> Project: Commons BCEL
> Issue Type: Bug
> Components: Verifier
> Affects Versions: 6.0
> Reporter: Charles Honton
> Assignee: Sebb
>
> org.apache.bcel.util.BCELifier Java8Example fails:
> Exception in thread "main" org.apache.bcel.classfile.ClassFormatException: Constant pool at index 0 is null.
> at org.apache.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:259)
> at org.apache.bcel.classfile.ConstantPool.getConstantString(ConstantPool.java:294)
> at org.apache.bcel.generic.FieldOrMethod.getClassName(FieldOrMethod.java:89)
> at org.apache.bcel.util.BCELFactory.visitInvokeInstruction(BCELFactory.java:162)
> at org.apache.bcel.generic.INVOKEDYNAMIC.accept(INVOKEDYNAMIC.java:117)
> at org.apache.bcel.util.BCELFactory.start(BCELFactory.java:101)
> at org.apache.bcel.util.BCELifier.visitMethod(BCELifier.java:181)
> at org.apache.bcel.classfile.Method.accept(Method.java:106)
> at org.apache.bcel.util.BCELifier.visitJavaClass(BCELifier.java:120)
> at org.apache.bcel.util.BCELifier.start(BCELifier.java:69)
> at org.apache.bcel.util.BCELifier.main(BCELifier.java:270)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)