@@ -24,9 +24,9 @@ import scala.collection.JavaConverters._
2424import scala .collection .mutable .{Map , Set , Stack }
2525
2626import org .apache .commons .lang3 .ClassUtils
27- import org .apache .xbean .asm7 .{ClassReader , ClassVisitor , Handle , MethodVisitor , Type }
28- import org .apache .xbean .asm7 .Opcodes ._
29- import org .apache .xbean .asm7 .tree .{ClassNode , MethodNode }
27+ import org .apache .xbean .asm9 .{ClassReader , ClassVisitor , Handle , MethodVisitor , Type }
28+ import org .apache .xbean .asm9 .Opcodes ._
29+ import org .apache .xbean .asm9 .tree .{ClassNode , MethodNode }
3030
3131import org .apache .spark .{SparkEnv , SparkException }
3232import org .apache .spark .internal .Logging
@@ -664,7 +664,7 @@ private[spark] object IndylambdaScalaClosures extends Logging {
664664 val currentClass = currentId.cls
665665 val currentMethodNode = methodNodeById(currentId)
666666 logTrace(s " scanning ${currentId.cls.getName}. ${currentId.name}${currentId.desc}" )
667- currentMethodNode.accept(new MethodVisitor (ASM7 ) {
667+ currentMethodNode.accept(new MethodVisitor (ASM9 ) {
668668 val currentClassName = currentClass.getName
669669 val currentClassInternalName = currentClassName.replace('.' , '/' )
670670
@@ -744,7 +744,7 @@ private[spark] class ReturnStatementInClosureException
744744 extends SparkException (" Return statements aren't allowed in Spark closures" )
745745
746746private class ReturnStatementFinder (targetMethodName : Option [String ] = None )
747- extends ClassVisitor (ASM7 ) {
747+ extends ClassVisitor (ASM9 ) {
748748 override def visitMethod (access : Int , name : String , desc : String ,
749749 sig : String , exceptions : Array [String ]): MethodVisitor = {
750750
@@ -758,15 +758,15 @@ private class ReturnStatementFinder(targetMethodName: Option[String] = None)
758758 val isTargetMethod = targetMethodName.isEmpty ||
759759 name == targetMethodName.get || name == targetMethodName.get.stripSuffix(" $adapted" )
760760
761- new MethodVisitor (ASM7 ) {
761+ new MethodVisitor (ASM9 ) {
762762 override def visitTypeInsn (op : Int , tp : String ): Unit = {
763763 if (op == NEW && tp.contains(" scala/runtime/NonLocalReturnControl" ) && isTargetMethod) {
764764 throw new ReturnStatementInClosureException
765765 }
766766 }
767767 }
768768 } else {
769- new MethodVisitor (ASM7 ) {}
769+ new MethodVisitor (ASM9 ) {}
770770 }
771771 }
772772}
@@ -790,7 +790,7 @@ private[util] class FieldAccessFinder(
790790 findTransitively : Boolean ,
791791 specificMethod : Option [MethodIdentifier [_]] = None ,
792792 visitedMethods : Set [MethodIdentifier [_]] = Set .empty)
793- extends ClassVisitor (ASM7 ) {
793+ extends ClassVisitor (ASM9 ) {
794794
795795 override def visitMethod (
796796 access : Int ,
@@ -805,7 +805,7 @@ private[util] class FieldAccessFinder(
805805 return null
806806 }
807807
808- new MethodVisitor (ASM7 ) {
808+ new MethodVisitor (ASM9 ) {
809809 override def visitFieldInsn (op : Int , owner : String , name : String , desc : String ): Unit = {
810810 if (op == GETFIELD ) {
811811 for (cl <- fields.keys if cl.getName == owner.replace('/' , '.' )) {
@@ -845,7 +845,7 @@ private[util] class FieldAccessFinder(
845845 }
846846}
847847
848- private class InnerClosureFinder (output : Set [Class [_]]) extends ClassVisitor (ASM7 ) {
848+ private class InnerClosureFinder (output : Set [Class [_]]) extends ClassVisitor (ASM9 ) {
849849 var myName : String = null
850850
851851 // TODO: Recursively find inner closures that we indirectly reference, e.g.
@@ -860,7 +860,7 @@ private class InnerClosureFinder(output: Set[Class[_]]) extends ClassVisitor(ASM
860860
861861 override def visitMethod (access : Int , name : String , desc : String ,
862862 sig : String , exceptions : Array [String ]): MethodVisitor = {
863- new MethodVisitor (ASM7 ) {
863+ new MethodVisitor (ASM9 ) {
864864 override def visitMethodInsn (
865865 op : Int , owner : String , name : String , desc : String , itf : Boolean ): Unit = {
866866 val argTypes = Type .getArgumentTypes(desc)
0 commit comments