]> source.dussan.org Git - javassist.git/commitdiff
Generic is not supported by JDK under 1.5 version. 53/head
authorKyongSik-Yoon <sam1287@gmail.com>
Fri, 31 Jul 2015 06:36:33 +0000 (15:36 +0900)
committerKyongSik-Yoon <sam1287@gmail.com>
Fri, 31 Jul 2015 06:36:33 +0000 (15:36 +0900)
src/main/javassist/CtClassType.java

index e86780d3e1cd0d4c83fc633d61e38ae60e6aba15..8aa76b827891c18a8dfb8e108e0cec38aca9467b 100644 (file)
@@ -687,7 +687,7 @@ class CtClassType extends CtClass {
             }
             catch (ClassNotFoundException e2){
                 try {
-                    Class<?> clazz = cp.get(anno.getTypeName()).toClass();
+                    Class clazz = cp.get(anno.getTypeName()).toClass();
                     return javassist.bytecode.annotation.AnnotationImpl.make(
                                             clazz.getClassLoader(),
                                             clazz, cp, anno);
@@ -1226,14 +1226,14 @@ class CtClassType extends CtClass {
         CtMember.Cache memCache = getMembers();
         CtMember mth = memCache.methodHead();
         CtMember mthTail = memCache.lastMethod();
-        ArrayList<CtMethod> methods = new ArrayList<CtMethod>();
+        ArrayList methods = new ArrayList();
         while (mth != mthTail) {
             mth = mth.next();
             if (mth.getName().equals(name))
                 methods.add((CtMethod)mth);
         }
 
-        return methods.toArray(new CtMethod[methods.size()]);
+        return (CtMethod[]) methods.toArray(new CtMethod[methods.size()]);
     }
 
     public CtMethod getDeclaredMethod(String name) throws NotFoundException {