GeezerVison is showing github.com — False alarm: METHOD_NO_LONGER_VARARGS · Issue #393 · siom79/japicmp
False alarm: METHOD_NO_LONGER_VARARGS #393Descriptionversion:
0.20.0
The method is there, so this is a false alarm.
Reproduce progress:
- check out netty/netty 4.1 branch
- change the japicmp version to 0.20.0
- run japicmp check
Thanks for this great plugin, I find this when preparing a pr in: netty/netty#13989 Activitychanged the title [-]METHOD_NO_LONGER_VARARGS[/-] [+]False alarm: METHOD_NO_LONGER_VARARGS[/+] on Apr 21, 2024siom79 commented on Apr 21, 2024 Thanks for reporting.
The issues looks a bit weird. When debugging, it shows that in this line in the method extractVarargsModifier() the javassist library returns for behavior.getModifiers() the value 9 for the old version and 137 for the new version. And 137 & 128 means, that VARARGS is set in the new version but not in the old one. So from the point of japicmp it seems to be correct.
But if you compare both class files Unpooled.class, they are identical on each bit. So why does javassist read the value 9 in the old version and 137 in the new version? He-Pin commented on Apr 21, 2024
Thanks for reporting.
The issues looks a bit weird. When debugging, it shows that in this line in the method extractVarargsModifier() the javassist library returns for behavior.getModifiers() the value 9 for the old version and 137 for the new version. And 137 & 128 means, that VARARGS is set in the new version but not in the old one. So from the point of japicmp it seems to be correct.
But if you compare both class files Unpooled.class, they are identical on each bit. So why does javassist read the value 9 in the old version and 137 in the new version?
Thanks for quick validation this, this maybe bump javasist version in later release ?I'm not an expert on this. But I checked 0.15.7, it works. added 2 commits that reference this issue on Apr 21, 2024#393 In case of method with array (byte[]) and varargs array (byte[].… siom79 commented on Apr 21, 2024 1,5 hours later: There was an issue with matching the corresponding methods in case one method had a byte array as parameter (byte[]) and the other one an array of byte arrays with varargs (byte[]...). The algorithm did falsely match the wrong arguments (treating byte[]... the same as byte[]). Therefore, the code comparing the varargs bit in the modifiers did compare two different methods. :-)
I have fixed this with the last commit. Reacted by He-Pin(kerr) Reacted by He-Pin(kerr) He-Pin commented on Apr 22, 2024 Thanks, do you plan a newer release soon, I would like to submit a pr in Netty for this. siom79 commented on Apr 22, 2024 Reacted by He-Pin(kerr) Reacted by He-Pin(kerr) Reacted by He-Pin(kerr)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|