0 Replies Latest reply on Feb 12, 2005 6:51 PM by Dominique Dechamps

    CtField endless loop

    Dominique Dechamps Newbie

      Bonjour,

      There is a circularity problem in the CtField.append method
      in the code
      while (lst.next != null){
      lst = lst.next; // infinite loop if lst==lst.next
      }

      This happens when I use myPool= ClassPool.getDefault();
      instead of myPool= new ClassPool();
      myPool.appendSystemPath();

      /// Here the instrumentation trace of CtField.append
      CtField.append
      list=32320232 javassist.CtField@1ed2ae8[private static final JDEdoc Ljava/lang/String;]
      tail=23105029 javassist.compiler.Javac$CtFieldWithInit@1608e05[private static final JDEdoc Ljava/lang/String;]

      while lst.hashCode=32320232 javassist.CtField@1ed2ae8[private static final JDEdoc Ljava/lang/String;]
      lst.next.hashCode=27010805 javassist.CtField@19c26f5[private static final JDEsrc Ljava/lang/String;]

      while lst.hashCode=27010805 javassist.CtField@19c26f5[private static final JDEsrc Ljava/lang/String;]
      lst.next.hashCode=12694833 javassist.CtField@c1b531[public static final jde Z]

      while lst.hashCode=12694833 javassist.CtField@c1b531[public static final jde Z]
      lst.next.hashCode=16939853 javassist.compiler.Javac$CtFieldWithInit@1027b4d[private static final JDEdoc Ljava/lang/String;]

      Circularity lst.hashCode=16939853 javassist.compiler.Javac$CtFieldWithInit@1027b4d[private static final JDEdoc Ljava/lang/String;]
      lst.next.hashCode=16939853 javassist.compiler.Javac$CtFieldWithInit@1027b4d[private static final JDEdoc Ljava/lang/String;]

      Hope this help
      Dominique