Solve thread leaking problem in intellij idea ultimate with obfuscated fileds
This commit is contained in:
@@ -175,7 +175,13 @@ fun patchThreadTracker(runnable: () -> Unit) {
|
|||||||
println("Patching!")
|
println("Patching!")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val wellKnownOffendersField = ThreadTracker::class.java.getDeclaredField("wellKnownOffenders")
|
val wellKnownOffendersField = try {
|
||||||
|
ThreadTracker::class.java.getDeclaredField("wellKnownOffenders")
|
||||||
|
}
|
||||||
|
catch (communityPropertyNotFoundEx: NoSuchFieldException) {
|
||||||
|
ThreadTracker::class.java.getDeclaredField("a")
|
||||||
|
}
|
||||||
|
|
||||||
wellKnownOffendersField.isAccessible = true
|
wellKnownOffendersField.isAccessible = true
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
|||||||
Reference in New Issue
Block a user