You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
We are experiencing an issue since Byte Buddy is published with multi-release jars.
In some rare cases, we hit the following exception
Field with name invocationHandler$92met31 and type interface java.lang.reflect.InvocationHandler already declared by class net.bytebuddy.renamed.java.lang.Object$ByteBuddy$MaWbun1g
java.lang.IllegalStateException: Field with name invocationHandler$92met31 and type interface java.lang.reflect.InvocationHandler already declared by class net.bytebuddy.renamed.java.lang.Object$ByteBuddy$MaWbun1g
at net.bytebuddy.implementation.InvocationHandlerAdapter$ForInstance.prepare(InvocationHandlerAdapter.java:363)
at net.bytebuddy.dynamic.scaffold.MethodRegistry$Handler$ForImplementation.prepare(MethodRegistry.java:227)
at net.bytebuddy.dynamic.scaffold.MethodRegistry$Default.prepare(MethodRegistry.java:460)
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.toTypeWriter(SubclassDynamicTypeBuilder.java:222)
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.toTypeWriter(SubclassDynamicTypeBuilder.java:213)
at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase$UsingTypeWriter.make(DynamicType.java:4085)
at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase.make(DynamicType.java:3769)
at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase$Delegator.make(DynamicType.java:4021)
at com.airlock.poc.bytebuddy.ListProxyInvocationHandler.createWrapperType(ListInvocationHandler.java:111)
The exception consistently is thrown with Byte Buddy v1.15.5 and later, with v1.15.4 we do not have any problems.
When debugging the issue, it seems that the hashcode calculated on net.bytebuddy.dynamic.scaffold.MethodRegistry.Handler.ForImplementation and implicitly used at net.bytebuddy.dynamic.scaffold.MethodRegistry.Default#prepare:70 by the hash map handlers differs in some cases between the above mentioned versions. This then leads to duplicate preparations of the same handler.
The text was updated successfully, but these errors were encountered:
lenggi
changed the title
IllegalStateException when running mit multi-release jars (i.e. since 1.15.5)
IllegalStateException when running with multi-release jars (i.e. since 1.15.5)
Jan 13, 2025
It seems like the hash code and equals methods were not added, and this makes total sense given the current build setup, so it does not recognize the duplication. Sorry for that, this went fully unnoticed.
I fixed the build issue (Maven is certainly starting to reach its limit when it comes to building Byte Buddy...) and tested on your project and it now works. This will be released soon, or you can build the master branch.
Hi
We are experiencing an issue since Byte Buddy is published with multi-release jars.
In some rare cases, we hit the following exception
The exception consistently is thrown with Byte Buddy v1.15.5 and later, with v1.15.4 we do not have any problems.
When debugging the issue, it seems that the hashcode calculated on
net.bytebuddy.dynamic.scaffold.MethodRegistry.Handler.ForImplementation
and implicitly used atnet.bytebuddy.dynamic.scaffold.MethodRegistry.Default#prepare:70
by the hash maphandlers
differs in some cases between the above mentioned versions. This then leads to duplicate preparations of the same handler.An example to reproduce the issue is attached.
reproduce-illegalstate-exception.zip
The text was updated successfully, but these errors were encountered: