Make private fields final.
MODIFY
src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
@@ -93,11 +93,11 @@ public void testPrimitiveLong() throws Exception {
private static class Test implements Serializable {
private static final long serialVersionUID = 1L;
- private int i;
+ private final int i;
- private Object o;
+ private final Object o;
- private E e;
+ private final E e;
Test(int i, Object o) {
this.i = i;

MODIFY
src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
private File file1;
private File file2;
private String textContent;
- private char[] anotherTestContent = new char[]{'f', 'z', 'x'};
+ private final char[] anotherTestContent = new char[]{'f', 'z', 'x'};
@Before
public void setUp() {

Make private fields final.