[jboss-cvs] javassist/src/test/test ...

Shigeru Chiba chiba at is.titech.ac.jp
Tue Mar 18 17:36:06 EDT 2008


  User: chiba   
  Date: 08/03/18 17:36:06

  Modified:    src/test/test  Test.java
  Log:
  fixed a bug of CodeIterator.insertGap() with JDK 1.6
  
  Revision  Changes    Path
  1.2       +4 -8      javassist/src/test/test/Test.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Test.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/test/test/Test.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- Test.java	9 Feb 2007 18:05:21 -0000	1.1
  +++ Test.java	18 Mar 2008 21:36:06 -0000	1.2
  @@ -1,14 +1,10 @@
   package test;
   
  -import javassist.bytecode.*;
  +import javassist.*;
   
   public class Test {
  -    public static void main(String[] args) {
  -        String[] names = Mnemonic.OPCODE;
  -        for (int i = 0; i < names.length; i++)
  -            if (names[i] == null)
  -                System.out.println("        case " + i + " :");
  -            else
  -                System.out.println("        case Opcode." + names[i].toUpperCase() + " :");
  +    public static void main(String[] args) throws Exception {
  +        CtClass ctClass = ClassPool.getDefault().get("JavassistTarget");
  +        ctClass.getMethod("method", "(Ljava/lang/String;)V").insertAfter("");
       }
   }
  
  
  



More information about the jboss-cvs-commits mailing list