[
https://issues.apache.org/jira/browse/BCEL-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17576398#comment-17576398
]
Alexander Kriegisch edited comment on BCEL-362 at 8/7/22 3:00 PM:
------------------------------------------------------------------
Update: I think I just had an idea how to reproduce this without AspectJ.
Locally, I was able to reproduce the problem already, basically by
instrumenting code with JaCoCo, writing it to disk and then passing the
generated class through your example
[{{JasminVisitor}}|https://github.com/apache/commons-bcel/blob/8b0b16884064dc51b58ad4c28e41e7fbef90be97/src/examples/JasminVisitor.java]
class. But I need to clean up the example a little more first with regard to
the Maven build. Unfortunately, I am in a hurry to go to a concert this
evening, but I guess in the next few days I can upload something for you. It
should be easy for you to also reproduce it, simply following my textual
description.
was (Author: kriegaex):
Update: I think I just had an idea how to reproduce this without AspectJ.
Locally, I was able to reproduce the problem already, basically by
instrumenting code with JaCoCo, writing it to disk and then passing the
generated class through your example
[{{JasminVisitor}}|https://github.com/apache/commons-bcel/blob/8b0b16884064dc51b58ad4c28e41e7fbef90be97/src/examples/JasminVisitor.java]
class. But I need to clean up the example a little more first with regard to
the Maven build. Unfortunately, I am in a hurry to go to a concert this
evening, but I guess in the next few days I can upload something for you.
> 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
>
> _Disclaimer: I am not a byte code buff, so if I am misunderstanding anything
> here, please forgive me for raising a stupid issue, try to be patient and
> explain it to me._
> 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. FYI, we are using BCEL code in AspectJ, and
> whenever people combine it with JaCoCo, corresponding problems occur.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)