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/08/07 13:35:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17576383#comment-17576383 ] 

Alexander Kriegisch commented on BCEL-362:
------------------------------------------

Well, there must be some byte code gurus among the group of commiters here, I would think. Otherwise, it would be impossible to maintain a project like this in the first place. I would like to get feedback from a maintainer first, if the places in the code base, which I pointed to, are obviously lacking code handling condy or not. Maybe I as a user misunderstand something and my code is wrong. My reproducer would only reproduce a problem we have in AspectJ, which would not help you debug anything in BCEL in isolation. Actually, I do not "speak BCEL" at all. But you could try instrumenting some Java code with JaCoCo and then somehow transfor it with BCEL and see if you hit the same problems without involving AspectJ. I think that the details I provided so far should be enough for a BCEL committer to verify this problem.

> 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)