Skip to content

Commit

Permalink
删除CtClass.detach()
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyJingFish committed Oct 27, 2024
1 parent b6743fd commit a86fd60
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ open class ReplaceBaseClassVisitor(
val cp = ClassPoolUtils.getNewClassPool()
val ctClass = cp.get(extendClass)
val has = ctClass.getConstructor(descriptor) != null
ctClass.detach()
// ctClass.detach()
has
} catch (e: Exception) {
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ object WovenIntoCode {
WovenInfoUtils.recordOverrideClassname(value.overrideClassname,value.methodName, value.descriptor)
} catch (_: Exception) {
}
ctClass.detach()
// ctClass.detach()
}
}
thisCollectClassName?.let {
Expand Down Expand Up @@ -489,7 +489,7 @@ object WovenIntoCode {
}
}
val wovenBytes = ctClass.toBytecode()
ctClass.detach()
// ctClass.detach()
return wovenBytes
}

Expand Down Expand Up @@ -794,7 +794,7 @@ object WovenIntoCode {
}else{
iterator.remove()
}
ctClass.detach()
// ctClass.detach()
} catch (_: Exception) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ class AopTaskUtils(private val project: Project,private val variantName: String,
}
}
}
for (allMethod in allMethods) {
allMethod.declaringClass.detach()
}
ctClass.detach()
// for (allMethod in allMethods) {
// allMethod.declaringClass.detach()
// }
// ctClass.detach()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ object ClassFileUtils {
outFile.checkExist()
classByteData.saveFile(outFile)
cacheFiles.add(path)
ctClass.detach()
// ctClass.detach()
}
return cacheFiles
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ fun String.instanceof(instanceofClassNameKey: String): Boolean {
val clazz = pool!!.get(className)
val instanceofClazz = pool.get(instanceofClassName)
val subtypeOf = clazz.subtypeOf(instanceofClazz)
clazz.detach()
instanceofClazz.detach()
// clazz.detach()
// instanceofClazz.detach()
subtypeOf
} catch (e: Exception) {
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ object WovenInfoUtils {
}
}
}
ctClass.detach()
// ctClass.detach()
}

fun addCollectConfig(aopCollectCut: AopCollectCut){
Expand Down

0 comments on commit a86fd60

Please sign in to comment.