Mark fields as final where appropriate
This commit is contained in:
@@ -69,7 +69,7 @@ import org.springframework.lang.Nullable;
|
||||
*/
|
||||
public class JobLauncherTestUtils {
|
||||
|
||||
private SecureRandom secureRandom = new SecureRandom();
|
||||
private final SecureRandom secureRandom = new SecureRandom();
|
||||
|
||||
/** Logger */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@@ -142,7 +142,7 @@ public class JobScopeTestExecutionListener implements TestExecutionListener {
|
||||
*/
|
||||
private static final class ExtractorMethodCallback implements MethodCallback {
|
||||
|
||||
private String preferredName;
|
||||
private final String preferredName;
|
||||
|
||||
private final Class<?> preferredType;
|
||||
|
||||
|
||||
@@ -70,9 +70,9 @@ public class StepRunner {
|
||||
/** Logger */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private JobLauncher launcher;
|
||||
private final JobLauncher launcher;
|
||||
|
||||
private JobRepository jobRepository;
|
||||
private final JobRepository jobRepository;
|
||||
|
||||
public StepRunner(JobLauncher launcher, JobRepository jobRepository) {
|
||||
this.launcher = launcher;
|
||||
|
||||
@@ -145,7 +145,7 @@ public class StepScopeTestExecutionListener implements TestExecutionListener {
|
||||
*/
|
||||
private static final class ExtractorMethodCallback implements MethodCallback {
|
||||
|
||||
private String preferredName;
|
||||
private final String preferredName;
|
||||
|
||||
private final Class<?> preferredType;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,10 +25,11 @@ import org.aspectj.lang.JoinPoint;
|
||||
* representation of the object to the log.
|
||||
*
|
||||
* @author Lucas Ward
|
||||
* @author Mahmoud Ben Hassine
|
||||
*/
|
||||
public class LogAdvice {
|
||||
|
||||
private static Log log = LogFactory.getLog(LogAdvice.class);
|
||||
private static final Log log = LogFactory.getLog(LogAdvice.class);
|
||||
|
||||
/*
|
||||
* Wraps original method and adds logging both before and after method
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2012 the original author or authors.
|
||||
* Copyright 2008-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,12 +19,13 @@ import org.springframework.context.ApplicationEvent;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Mahmoud Ben Hassine
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SimpleMessageApplicationEvent extends ApplicationEvent {
|
||||
|
||||
private String message;
|
||||
private final String message;
|
||||
|
||||
public SimpleMessageApplicationEvent(Object source, String message) {
|
||||
super(source);
|
||||
|
||||
Reference in New Issue
Block a user