Polishing

This commit is contained in:
Juergen Hoeller
2017-10-23 17:14:09 +02:00
parent f31069ac05
commit ecea82d3a5
3 changed files with 85 additions and 85 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -156,7 +156,7 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements
public Set<MethodMetadata> getAnnotatedMethods(String annotationName) {
try {
Method[] methods = getIntrospectedClass().getDeclaredMethods();
Set<MethodMetadata> annotatedMethods = new LinkedHashSet<>();
Set<MethodMetadata> annotatedMethods = new LinkedHashSet<>(4);
for (Method method : methods) {
if (!method.isBridge() && method.getAnnotations().length > 0 &&
AnnotatedElementUtils.isAnnotated(method, annotationName)) {

View File

@@ -79,12 +79,13 @@ public class MethodMetadataReadingVisitor extends MethodVisitor implements Metho
@Override
public AnnotationVisitor visitAnnotation(final String desc, boolean visible) {
String className = Type.getType(desc).getClassName();
this.methodMetadataSet.add(this);
String className = Type.getType(desc).getClassName();
return new AnnotationAttributesReadingVisitor(
className, this.attributesMap, this.metaAnnotationMap, this.classLoader);
}
@Override
public String getMethodName() {
return this.methodName;