Replace for loops with enhanced for loops
This commit is contained in:
@@ -122,13 +122,12 @@ public class JobRegistryBackgroundJobRunner {
|
||||
|
||||
maybeCreateJobLoader();
|
||||
|
||||
for (int i = 0; i < paths.length; i++) {
|
||||
for (String s : paths) {
|
||||
|
||||
Resource[] resources = parentContext.getResources(paths[i]);
|
||||
Resource[] resources = parentContext.getResources(s);
|
||||
|
||||
for (int j = 0; j < resources.length; j++) {
|
||||
for (Resource path : resources) {
|
||||
|
||||
Resource path = resources[j];
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Registering Job definitions from " + Arrays.toString(resources));
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ public class BatchMessageListenerContainer extends DefaultMessageListenerContain
|
||||
*/
|
||||
public void initializeProxy() {
|
||||
ProxyFactory factory = new ProxyFactory();
|
||||
for (int i = 0; i < advices.length; i++) {
|
||||
DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(advices[i]);
|
||||
for (Advice advice : advices) {
|
||||
DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(advice);
|
||||
NameMatchMethodPointcut pointcut = new NameMatchMethodPointcut();
|
||||
pointcut.addMethodName("receiveAndExecute");
|
||||
advisor.setPointcut(pointcut);
|
||||
|
||||
Reference in New Issue
Block a user