Make fields final
Closes gh-33537
This commit is contained in:
@@ -146,7 +146,7 @@ public class FilteredClassLoader extends URLClassLoader implements SmartClassLoa
|
||||
*/
|
||||
public static final class ClassFilter implements Predicate<String> {
|
||||
|
||||
private Class<?>[] hiddenClasses;
|
||||
private final Class<?>[] hiddenClasses;
|
||||
|
||||
private ClassFilter(Class<?>[] hiddenClasses) {
|
||||
this.hiddenClasses = hiddenClasses;
|
||||
|
||||
@@ -95,11 +95,11 @@ public class MockitoPostProcessor implements InstantiationAwareBeanPostProcessor
|
||||
|
||||
private final MockitoBeans mockitoBeans = new MockitoBeans();
|
||||
|
||||
private Map<Definition, String> beanNameRegistry = new HashMap<>();
|
||||
private final Map<Definition, String> beanNameRegistry = new HashMap<>();
|
||||
|
||||
private Map<Field, String> fieldRegistry = new HashMap<>();
|
||||
private final Map<Field, String> fieldRegistry = new HashMap<>();
|
||||
|
||||
private Map<String, SpyDefinition> spies = new HashMap<>();
|
||||
private final Map<String, SpyDefinition> spies = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Create a new {@link MockitoPostProcessor} instance with the given initial
|
||||
|
||||
@@ -318,7 +318,7 @@ class OutputCapture implements CapturedOutput {
|
||||
*/
|
||||
private static class AnsiOutputState {
|
||||
|
||||
private Enabled saved;
|
||||
private final Enabled saved;
|
||||
|
||||
AnsiOutputState() {
|
||||
this.saved = AnsiOutput.getEnabled();
|
||||
|
||||
@@ -55,7 +55,7 @@ public class OutputCaptureRule implements TestRule, CapturedOutput {
|
||||
|
||||
private final OutputCapture delegate = new OutputCapture();
|
||||
|
||||
private List<Matcher<? super String>> matchers = new ArrayList<>();
|
||||
private final List<Matcher<? super String>> matchers = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public Statement apply(Statement base, Description description) {
|
||||
|
||||
Reference in New Issue
Block a user