Avoid premature declaration of variables

Closes gh-15215
This commit is contained in:
dreis2211
2018-11-19 14:09:28 +01:00
committed by Stephane Nicoll
parent 6d2a91ed83
commit f57f16c190
4 changed files with 5 additions and 5 deletions

View File

@@ -120,7 +120,6 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
if (skip == SkipPropertyMapping.YES) {
return;
}
String name = getName(typeMapping, attributeMapping, attribute);
ReflectionUtils.makeAccessible(attribute);
Object value = ReflectionUtils.invokeMethod(attribute, annotation);
if (skip == SkipPropertyMapping.ON_DEFAULT_VALUE) {
@@ -130,6 +129,7 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
return;
}
}
String name = getName(typeMapping, attributeMapping, attribute);
putProperties(name, value, properties);
}