Skip to content

Commit 20a6073

Browse files
committed
Polish
1 parent 452446f commit 20a6073

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,17 @@ public String toString() {
281281
}
282282

283283
Method findSetter(Class<?> type) {
284-
return extracted("set", type, String.class);
284+
return findMethod("set", type, String.class);
285285
}
286286

287287
Method findGetter(Class<?> type) {
288-
return extracted("get", type);
288+
return findMethod("get", type);
289289
}
290290

291-
private Method extracted(String prefix, Class<?> type, Class<?>... paramTypes) {
292-
for (String candidate : this.names) {
293-
Method method = ReflectionUtils.findMethod(type, prefix + StringUtils.capitalize(candidate),
294-
paramTypes);
291+
private Method findMethod(String prefix, Class<?> type, Class<?>... paramTypes) {
292+
for (String name : this.names) {
293+
String candidate = prefix + StringUtils.capitalize(name);
294+
Method method = ReflectionUtils.findMethod(type, candidate, paramTypes);
295295
if (method != null) {
296296
return method;
297297
}

0 commit comments

Comments
 (0)