Make fields final

Closes gh-33537
This commit is contained in:
Moritz Halbritter
2022-12-16 14:28:44 +01:00
parent 216d15997a
commit 725337f976
285 changed files with 445 additions and 437 deletions

View File

@@ -722,9 +722,9 @@ abstract class AbstractPackagerTests<P extends Packager> {
private static final Layer DEFAULT_LAYER = new Layer("default");
private Set<Layer> layers = new LinkedHashSet<>();
private final Set<Layer> layers = new LinkedHashSet<>();
private Map<String, Layer> libraries = new HashMap<>();
private final Map<String, Layer> libraries = new HashMap<>();
TestLayers() {
this.layers.add(DEFAULT_LAYER);

View File

@@ -30,7 +30,7 @@ import static org.mockito.Mockito.mock;
*/
class ImplicitLayerResolverTests {
private Layers layers = Layers.IMPLICIT;
private final Layers layers = Layers.IMPLICIT;
@Test
void iteratorReturnsLayers() {

View File

@@ -60,7 +60,7 @@ class SizeCalculatingEntryWriterTests {
private static class TestEntryWriter implements EntryWriter {
private byte[] bytes;
private final byte[] bytes;
TestEntryWriter(int size) {
this.bytes = new byte[size];