Browse Source

Merge pull request #53 from KyongSik-Yoon/patch-3

Generic is not supported by JDK under 1.5 version.
tags/rel_3_21_0-java9-ea
Shigeru Chiba 8 years ago
parent
commit
af8aba0dd4
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/main/javassist/CtClassType.java

+ 3
- 3
src/main/javassist/CtClassType.java View 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 {

Loading…
Cancel
Save