You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alexander Kriegisch (Jira)" <ji...@apache.org> on 2022/06/25 07:59:00 UTC
[jira] [Updated] (BCEL-362) Handling for Constants.CONSTANT_Dynamic is missing in class ConstantPool
[ https://issues.apache.org/jira/browse/BCEL-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Kriegisch updated BCEL-362:
-------------------------------------
Description:
When looking at the class {{[ConstantPool|https://github.com/apache/commons-bcel/blob/5165671d2bc4bed17918051f1689ee5fd4c3425a/src/main/java/org/apache/bcel/classfile/ConstantPool.java]}}, it seems as if condy is not being handled in methods
* {{constantToString(Constant)}},
* {{addConstant(Constant, ConstantPool)}},
* {{addConstantDynamic(int, int)}} (method does not exist, not sure if it would be necessary).
I would have expected something like {{case Constants.CONSTANT_Dynamic}} with proper handling for this case in the first two methods.
When using BCEL in order to parse class files using condy, like JaCoCo creates them, this causes errors.
was:When looking at the switch-case statement around https://github.com/apache/commons-bcel/blob/5165671d2bc4bed17918051f1689ee5fd4c3425a/src/main/java/org/apache/bcel/classfile/ConstantPool.java#L179-L184, it seems as if {{case Constants.CONSTANT_Dynamic}} and a corresponding {{addConstantDynamic(index1, index2)}} method are missing. When using BCEL in order to parse class files using condy, like JaCoCo creates them, this causes errors.
> Handling for Constants.CONSTANT_Dynamic is missing in class ConstantPool
> ------------------------------------------------------------------------
>
> Key: BCEL-362
> URL: https://issues.apache.org/jira/browse/BCEL-362
> Project: Commons BCEL
> Issue Type: Bug
> Reporter: Alexander Kriegisch
> Priority: Major
>
> When looking at the class {{[ConstantPool|https://github.com/apache/commons-bcel/blob/5165671d2bc4bed17918051f1689ee5fd4c3425a/src/main/java/org/apache/bcel/classfile/ConstantPool.java]}}, it seems as if condy is not being handled in methods
> * {{constantToString(Constant)}},
> * {{addConstant(Constant, ConstantPool)}},
> * {{addConstantDynamic(int, int)}} (method does not exist, not sure if it would be necessary).
> I would have expected something like {{case Constants.CONSTANT_Dynamic}} with proper handling for this case in the first two methods.
> When using BCEL in order to parse class files using condy, like JaCoCo creates them, this causes errors.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)