2 Replies Latest reply on Jun 23, 2005 12:48 PM by Shigeru Chiba

    javassist.CannotCompileException: [source error] invalid ty

    Roman Dolgov Newbie

      When I call :

      CtMethod cm = ...
      cm.insertAfter("if ($_ == null);");
      

      for method which return int[], for ex:

      public int[] test() {
       int[] arr = {1,2};
       return arr;
       }
      


      I keep getting " javassist.CannotCompileException: [source error] invalid types for ==" exception.

      Is there any way to avoid it?

      thank you
      Roman