ENT-11343: Dont instrument files starting with jdk as well now. (#7741)

* ENT-11343: Dont instrument files starting with jdk as well now.

* ENT-11343: Keep detekt happy.
This commit is contained in:
Adel El-Beik 2024-06-04 17:55:15 +01:00 committed by GitHub
parent da4cce23c3
commit 78bc8e3383
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ description 'A javaagent to allow hooking into Kryo checkpoints'
dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compileOnly "org.javassist:javassist:$javaassist_version"
implementation "org.javassist:javassist:$javaassist_version"
compileOnly "com.esotericsoftware:kryo:$kryo_version"
compileOnly "co.paralleluniverse:quasar-core:$quasar_version"

View File

@ -127,7 +127,9 @@ object CheckpointHook : ClassFileTransformer {
protectionDomain: ProtectionDomain?,
classfileBuffer: ByteArray
): ByteArray? {
if (className.startsWith("java") || className.startsWith("javassist") || className.startsWith("kotlin")) {
@Suppress("ComplexCondition")
if (className.startsWith("java") || className.startsWith("javassist") || className.startsWith("kotlin")
|| className.startsWith("jdk")) {
return null
}
return try {