@@ -42,28 +42,14 @@ class DangerZone(pluginLocation: URI) {
42
42
bcINFO.classBytes.forEach { (k,v) -> totalCInfos.addAll(getClassDangerInfo(bcINFO.yourURL, k, v)) }
43
43
return totalCInfos
44
44
}
45
- companion object {
46
- fun getClassDangerInfo (yourURL : URL , entryName : String , classBytes : ByteArray ): List <ClassDangerCheckInfo > {
47
- val classInfo = mutableListOf<ClassDangerCheckInfo >()
48
- /* val classReader = ClassReader(classBytes)
49
- classReader.accept(object : ClassVisitor(Opcodes.ASM9) {
50
- override fun visitMethod(access: Int, name: String, descriptor: String, signature: String?, exceptions: Array<String>?): MethodVisitor? {
51
- print("${access}, ${name}, ${descriptor}, ${signature}" )
52
- exceptions?.forEach { print(it) }
53
- println()
54
- return null
55
- }
56
- override fun visitSource(source: String?, debug: String?){
57
- println("$source :: $debug")
58
- }
59
- override fun visitPermittedSubclass(permittedSubclass: String?){
60
- println("PSubC: $permittedSubclass")
61
- }
62
- //TODO: visit all the other things and add the object(s) to the list so we can dangerCheck() later!
63
- //Add them all to 1 object for ease of use later
64
- }, ClassReader.EXPAND_FRAMES)*/
65
- return classInfo
66
- }
45
+ private fun getClassDangerInfo (yourURL : URL , entryName : String , classBytes : ByteArray ): List <ClassDangerCheckInfo > {
46
+ val classInfo = mutableListOf<ClassDangerCheckInfo >()
47
+ val classReader = ClassReader (classBytes)
48
+ classReader.accept(object : ClassVisitor (Opcodes .ASM9 ) {
49
+ // TODO: visit all the other things and add the object(s) to the list so we can dangerCheck() later!
50
+ // Add them all to 1 object for ease of use later
51
+ }, ClassReader .EXPAND_FRAMES )
52
+ return classInfo
67
53
}
68
54
fun rescDangerScan (bcINFO : JByteCodeURLINFO ): List <CInfo > {
69
55
val totalCInfos = mutableListOf<CInfo >()
0 commit comments