Hoist concatenation of two constant Strings out of loops

Closes gh-24388
This commit is contained in:
Сергей Цыпанов
2020-01-17 17:59:39 +02:00
committed by Sam Brannen
parent 59bef22235
commit 3adc7c3059
2 changed files with 7 additions and 3 deletions

View File

@@ -166,9 +166,10 @@ public class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisito
if (attributes == null) {
return null;
}
String annotatedElement = "class '" + getClassName() + "'";
for (AnnotationAttributes raw : attributes) {
for (Map.Entry<String, Object> entry : AnnotationReadingVisitorUtils.convertClassValues(
"class '" + getClassName() + "'", this.classLoader, raw, classValuesAsString).entrySet()) {
annotatedElement, this.classLoader, raw, classValuesAsString).entrySet()) {
allAttributes.add(entry.getKey(), entry.getValue());
}
}