@@ -225,8 +225,7 @@ private Set<Method> getMethods(Class<?> type, Object targetObject) {
225
225
if (targetObject instanceof Class ) {
226
226
Set <Method > result = new LinkedHashSet <>();
227
227
// Add these so that static methods are invocable on the type: e.g. Float.valueOf(..)
228
- Method [] methods = getMethods (type );
229
- for (Method method : methods ) {
228
+ for (Method method : getMethods (type )) {
230
229
if (Modifier .isStatic (method .getModifiers ())) {
231
230
result .add (method );
232
231
}
@@ -239,8 +238,7 @@ else if (Proxy.isProxyClass(type)) {
239
238
Set <Method > result = new LinkedHashSet <>();
240
239
// Expose interface methods (not proxy-declared overrides) for proper vararg introspection
241
240
for (Class <?> ifc : type .getInterfaces ()) {
242
- Method [] methods = getMethods (ifc );
243
- for (Method method : methods ) {
241
+ for (Method method : getMethods (ifc )) {
244
242
if (isCandidateForInvocation (method , type )) {
245
243
result .add (method );
246
244
}
@@ -250,8 +248,7 @@ else if (Proxy.isProxyClass(type)) {
250
248
}
251
249
else {
252
250
Set <Method > result = new LinkedHashSet <>();
253
- Method [] methods = getMethods (type );
254
- for (Method method : methods ) {
251
+ for (Method method : getMethods (type )) {
255
252
if (isCandidateForInvocation (method , type )) {
256
253
result .add (method );
257
254
}
@@ -276,7 +273,7 @@ protected Method[] getMethods(Class<?> type) {
276
273
* Determine whether the given {@code Method} is a candidate for method resolution
277
274
* on an instance of the given target class.
278
275
* <p>The default implementation considers any method as a candidate, even for
279
- * static methods sand non-user-declared methods on the {@link Object} base class.
276
+ * static methods and non-user-declared methods on the {@link Object} base class.
280
277
* @param method the Method to evaluate
281
278
* @param targetClass the concrete target class that is being introspected
282
279
* @since 4.3.15
0 commit comments