Skip to content

Commit c369190

Browse files
acktsapfmbenhassine
authored andcommitted
Remove static imports in production code
Signed-off-by: Taeik Lim <[email protected]>
1 parent 74520a5 commit c369190

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,9 +35,6 @@
3535
import org.springframework.core.Ordered;
3636
import org.springframework.util.Assert;
3737

38-
import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerByAnnotation;
39-
import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerForInterface;
40-
4138
/**
4239
* {@link FactoryBean} implementation that builds a listener based on the various
4340
* lifecycle methods or annotations that are provided. There are three possible ways of
@@ -61,6 +58,7 @@
6158
*
6259
* @author Lucas Ward
6360
* @author Dan Garrette
61+
* @author Taeik Lim
6462
* @since 2.0
6563
* @see ListenerMetaData
6664
*/
@@ -98,8 +96,8 @@ public Object getObject() {
9896
Set<MethodInvoker> invokers = new HashSet<>();
9997

10098
MethodInvoker invoker;
101-
invoker = getMethodInvokerForInterface(metaData.getListenerInterface(), metaData.getMethodName(), delegate,
102-
metaData.getParamTypes());
99+
invoker = MethodInvokerUtils.getMethodInvokerForInterface(metaData.getListenerInterface(),
100+
metaData.getMethodName(), delegate, metaData.getParamTypes());
103101
if (invoker != null) {
104102
invokers.add(invoker);
105103
}
@@ -111,7 +109,8 @@ public Object getObject() {
111109
}
112110

113111
if (metaData.getAnnotation() != null) {
114-
invoker = getMethodInvokerByAnnotation(metaData.getAnnotation(), delegate, metaData.getParamTypes());
112+
invoker = MethodInvokerUtils.getMethodInvokerByAnnotation(metaData.getAnnotation(), delegate,
113+
metaData.getParamTypes());
115114
if (invoker != null) {
116115
invokers.add(invoker);
117116
synthetic = true;

0 commit comments

Comments
 (0)