[core] fix jadx.plugins.input.java.data.ConstPoolReader.parseString()…#2654
Conversation
… error with Kotlin Annotation of byte array as a String to follow jvms-4.4.7 rules for encoding annotation strings in class files
|
@wech71 thanks 👍 |
You do everything right. I was trying to say, that branch in your fork shouldn't be a master. Because on Github master branch is write protected, and I will not be able to add fixes commit, like I do. |
|
thanks for accepting my changes :-)
hm, I just had another look at the spec and it seems I made a small mistake. The check for 6-byte encoding according 4.12. must be done before 3-byte encoding 4.8, because both use the same upper nibble of first byte and the same two bits for byte 2 and 3. This way the code currently always incorrectly enters 3-byte-encoding. Either the order of the check for 6-byte and 3-byte encoding has to be changed, or an easy fix woud be to change the line to so the 3-byte -special case will continue to the if 6-byte check. |
Description
fixes "TODO: parse modified UTF-8" in ConstPoolReader.parseString to follow jvms-4.4.7 rules for encoding annotation strings in class files
(This allows Kotlin Annotation-plugin to work with the Protobuffer byte array encoded as a String in the Kotlin Metadata of Kotlin 2.0 or newer)
(I apologize if this is incorrect now as you said, I should not merge to the master branch, but I could not find or push to a new branch in skylot/jadx. I do not have much experience with github)