title: cglib throws an IllegalArgumentException when enhancing the java.util.Date class
body: <p>I am trying to enhance <code>java.util.Date</code> with cglib. It does not work and I am not experienced with cglib, so I am wondering what is going wrong.</p>
  
  <p>For example, the below code enhancing an <code>ArrayList</code> works:</p>
  
  <pre><code>@Test
  public void enhance_ArrayList() {
  
      Enhancer enhancer = new Enhancer();
      enhancer.setSuperclass(ArrayList.class);
      enhancer.setCallback(new FixedValue() {
                  @Override
                  public Object loadObject() throws Exception {
                    return "Hello cglib!";
                  }
                });
  
      ArrayList enhanced = (ArrayList)enhancer.create();
  }
  </code></pre>
  
  <p>while the following code:</p>
  
  <pre><code>@Test
  public void enhance_Date() {
      Enhancer enhancer = new Enhancer();
      enhancer.setSuperclass(Date.class);
      enhancer.setCallback(new FixedValue() {
                  @Override
                  public Object loadObject() throws Exception {
                    return "Hello cglib!";
                  }
                });
  
      Date enhanced = (Date)enhancer.create();
  }
  </code></pre>
  
  <p>results in this exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException  
  at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
  at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
  at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
  at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
  at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
  at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
  at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
  at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
  at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
  </code></pre>