commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Kolinko (JIRA)" <>
Subject [jira] [Commented] (BCEL-180) Enable loading ConstantPool from a byte array
Date Mon, 13 Oct 2014 11:03:34 GMT


Konstantin Kolinko commented on BCEL-180:

So we need a way to create ConstantPool instance from byte array we can retrieve by calling

N.B. Byte array returned by ReferenceType::constantPool() does not contain entry count at
the start expected by ConstantPool(DataInputStream) implementation.

The above Javadoc for ReferenceType.constantPool() also says that "The format of the constant
pool may differ between versions of the Class File Format, so, the minor and major class version
numbers should be checked for compatibility".

Thus constructor may become ConstantPool(int, int, int, byte[])

> Enable loading ConstantPool from a byte array
> ---------------------------------------------
>                 Key: BCEL-180
>                 URL:
>             Project: Commons BCEL
>          Issue Type: Improvement
>            Reporter: Maxim Degtyarev
> In some cases such as JDI API we have the class constant pool content only in form of
separate byte array. Currently there is no way to load constant pool from byte array.
> The proposed patch add new public constructor to the org.apache.bcel.classfile.ConstantPool
that allow loading ConstantPool from byte array representation.
> GitHub pull request:

This message was sent by Atlassian JIRA

View raw message