RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5]
Michael Südkamp
duke at openjdk.java.net
Fri Dec 17 09:54:28 UTC 2021
On Mon, 22 Nov 2021 21:19:42 GMT, Jean-Philippe Bempel <jpbempel at openjdk.org> wrote:
>> Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision:
>>
>> formatting
>
> It would be nice to have your feedback on this, because I came back a lot on the design to implement my needs. So depending on yours, we may revisit some parts...
@jpbempel as assumed doing the deobfuscation using the IConstantPoolExtension is much more complicated than as I did it previously because it modifies internal state. I'm facing follow-up exceptions and have been trying for a while to sort them out. But I am clueless now.
I overwrote constantRead() and look for constants with instanceof String. Then I look up these Strings in my obfuscation mapping and if I get a hit, I replace the strings or the relevant substring with the deobfuscated string and return it. But this seem to create wrong internal state. I'm logging to console original and replaced strings and what Is see look fine to me according to my understanding.
Do you have any more hint? Otherwise I would push my current code to my fork and post the link here. If you can help I will continue, otherwise I'll have to stay with my existing solution doing the deobfuscation on formatting level, which is just fine for our purpose.
-------------
PR: https://git.openjdk.java.net/jmc/pull/333
More information about the jmc-dev
mailing list