-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
MinecraftPlus/Atlas
#1Description
When attempting to transform a jar compiled with JDK 17, I get java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9
.
This is due to Atlas using the constructor for ClassProviderInheritanceProvider
without an API version:
new ClassProviderInheritanceProvider(new CompositeClassProvider(classpath)) |
My temporary solution has been some ugly reflection:
atlas.install {
// Replace the inheritance provider start
val inheritanceProvider = AtlasTransformerContext::class.java.getDeclaredField("inheritanceProvider")
inheritanceProvider.isAccessible = true
val classProvider = ClassProviderInheritanceProvider::class.java.getDeclaredField("provider")
classProvider.isAccessible = true
inheritanceProvider.set(
it,
ClassProviderInheritanceProvider(
Opcodes.ASM9,
classProvider.get(inheritanceProvider.get(it)) as ClassProvider
)
)
// Replace the inheritance provider end
// return transformer to install...
}
Not sure if this should be fixed in Atlas or Bombe, so I am opening this issue. Thanks!
Metadata
Metadata
Assignees
Labels
No labels