commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David L Diehl (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (BCEL-173) ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid byte tag in constant pool
Date Wed, 17 Dec 2014 20:30:14 GMT

    [ https://issues.apache.org/jira/browse/BCEL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14250477#comment-14250477
] 

David L Diehl edited comment on BCEL-173 at 12/17/14 8:29 PM:
--------------------------------------------------------------

Hey Emmanuel, can you confirm for me that this issue is still a problem.  I got this:

java.lang.RuntimeException: Unknown constant type 18
at org.apache.bcel.classfile.ConstantPool.constantToString(ConstantPool.java:147)

>From examining the source, it appears the ContantPool class has a switch statement that
does not have a case for the CONSTANT_InvokeDynamic (18) value.  Thanks!


was (Author: dldiehl):
Hey Emmanuel, can you confirm for me that this issue is still a problem.  I got this:

java.lang.RuntimeException: Unknown constant type 18
at org.apache.bcel.classfile.ConstantPool.constantToString(ConstantPool.java:147)

>From examining the source, it appers the ContantPool class has a switch statement that
does not have a case for the CONSTANT_InvokeDynamic (18) value.  Thanks!

> ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid byte
tag in constant pool
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: BCEL-173
>                 URL: https://issues.apache.org/jira/browse/BCEL-173
>             Project: Commons BCEL
>          Issue Type: Bug
>    Affects Versions: 5.0, 5.1, 5.2
>            Reporter: David Carr
>             Fix For: 6.0
>
>         Attachments: bcel-bug.tgz
>
>
> See attached sample project that reproduces the failure.  On Java 7, it prints info about
the ConcurrentMap class.  On Java 8, it encounters the following exception:
> {code}
> Exception in thread "main" org.apache.bcel.classfile.ClassFormatException: Invalid byte
tag in constant pool: 18
> 	at org.apache.bcel.classfile.Constant.readConstant(Constant.java:146)
> 	at org.apache.bcel.classfile.ConstantPool.<init>(ConstantPool.java:67)
> 	at org.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:222)
> 	at org.apache.bcel.classfile.ClassParser.parse(ClassParser.java:136)
> 	at TestMain.main(TestMain.java:11)
> {code}
> To use the sample project, extract it and then run "./gradlew clean run".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message