mirror of
https://github.com/corda/corda.git
synced 2025-02-20 09:26:41 +00:00
ENT-1906: Upgrade DJVM to use ASM 6.2.1. (#4000)
This commit is contained in:
parent
842eac5c43
commit
b3b327c135
@ -9,7 +9,7 @@ description 'Corda deterministic JVM sandbox'
|
||||
|
||||
ext {
|
||||
// Shaded version of ASM to avoid conflict with root project.
|
||||
asm_version = '6.1.1'
|
||||
asm_version = '6.2.1'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -22,15 +22,17 @@ import org.objectweb.asm.Type
|
||||
*/
|
||||
open class SandboxClassWriter(
|
||||
classReader: ClassReader,
|
||||
private val classLoader: ClassLoader,
|
||||
private val cloader: ClassLoader,
|
||||
flags: Int = COMPUTE_FRAMES or COMPUTE_MAXS
|
||||
) : ClassWriter(classReader, flags) {
|
||||
|
||||
override fun getClassLoader(): ClassLoader = cloader
|
||||
|
||||
/**
|
||||
* Get the common super type of [type1] and [type2].
|
||||
*/
|
||||
override fun getCommonSuperClass(type1: String, type2: String): String {
|
||||
// Need to override [getCommonSuperClass] to ensure that the correct class loader is used.
|
||||
// Need to override [getCommonSuperClass] to ensure that we use ClassLoader.loadClass().
|
||||
when {
|
||||
type1 == OBJECT_NAME -> return type1
|
||||
type2 == OBJECT_NAME -> return type2
|
||||
|
Loading…
x
Reference in New Issue
Block a user