title: Syntax error when adding Runnable in static initializer with javassist
body: <p>I want to use javassist (version 3.19-GA) to generate bytecode of a static initializer of a class that starts a thread. For some reason I cannot understand javassist expects a ";" somewhere even though I believe the code I provide is syntactically correct. Does someone see more than I do? Here is the code. What is the problem?</p>
  
  <pre><code>ClassPool pool = ClassPool.getDefault();
  final CtClass clazz = pool.get(somename);
  clazz.makeClassInitializer().insertAfter(
     "try{Runnable r=new Runnable () {public void run () { System.out.println (\"hello!!!!\"); }}; " +
     "new Thread(r).start(); } catch(Exception e){}");
  </code></pre>
  
  <p>I'm getting the following exception:</p>
  
  <pre><code>javassist.CannotCompileException: [source error] ; is missing
      at javassist.CtBehavior.insertAfter(CtBehavior.java:877)
      at javassist.CtBehavior.insertAfter(CtBehavior.java:792)
      at my.code(myclass.java:111)
  </code></pre>
  
  <p>Thanks for any hint.</p>