]> source.dussan.org Git - poi.git/commitdiff
Eclipse automated refactor/cleanup: add final modifier to private fields to unit...
authorJaven O'Neal <onealj@apache.org>
Thu, 20 Oct 2016 02:21:14 +0000 (02:21 +0000)
committerJaven O'Neal <onealj@apache.org>
Thu, 20 Oct 2016 02:21:14 +0000 (02:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765739 13f79535-47bb-0310-9956-ffa450edef68

83 files changed:
src/integrationtest/org/apache/poi/stress/HSSFFileHandler.java
src/ooxml/testcases/org/apache/poi/xssf/model/TestThemesTable.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFChartAxis.java
src/scratchpad/testcases/org/apache/poi/hdgf/streams/StreamTest.java
src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java
src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestCString.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestColorSchemeAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000Atom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlink.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlinkAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjListAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfo.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfoAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestNotesAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlidePersistAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextBytesAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextCharsAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextHeaderAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxInteractiveInfoAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestUserEditAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java
src/scratchpad/testcases/org/apache/poi/hslf/util/TestSystemTimeUtils.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java
src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java
src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java
src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSavedByTable.java
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java
src/testcases/org/apache/poi/POIDataSamples.java
src/testcases/org/apache/poi/hssf/eventmodel/TestAbortableListener.java
src/testcases/org/apache/poi/hssf/eventmodel/TestEventRecordFactory.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java
src/testcases/org/apache/poi/hssf/record/TestAutoFilterInfoRecord.java
src/testcases/org/apache/poi/hssf/record/TestFtCblsSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java
src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
src/testcases/org/apache/poi/hssf/usermodel/RecordInspector.java
src/testcases/org/apache/poi/hssf/usermodel/SanityChecker.java
src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
src/testcases/org/apache/poi/hssf/usermodel/TestNonStandardWorkbookStreamNames.java
src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
src/testcases/org/apache/poi/poifs/eventfilesystem/TestPOIFSReaderRegistry.java
src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java
src/testcases/org/apache/poi/poifs/filesystem/SlowInputStream.java
src/testcases/org/apache/poi/poifs/filesystem/TestEntryUtils.java
src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
src/testcases/org/apache/poi/poifs/storage/LocalRawDataBlockList.java
src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java
src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java
src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java

index 19a06ab6357e4eca3a607c2bb37dca50f81be317..fcea5805863a0e778364f20059ef8e20aad4ea17 100644 (file)
@@ -30,7 +30,7 @@ import java.util.Set;
 import static org.junit.Assert.assertFalse;
 
 public class HSSFFileHandler extends SpreadsheetHandler {
-       private POIFSFileHandler delegate = new POIFSFileHandler();
+       private final POIFSFileHandler delegate = new POIFSFileHandler();
        @Override
     public void handleFile(InputStream stream) throws Exception {
                HSSFWorkbook wb = new HSSFWorkbook(stream);
index b867dc1099f325e2c4f14502432d7401a0f05fa8..ffeceb2898baf4782830ee6a390814d0ff260c72 100644 (file)
@@ -41,8 +41,8 @@ import org.junit.Test;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor;\r
 \r
 public class TestThemesTable {\r
-    private String testFileSimple = "Themes.xlsx";\r
-    private String testFileComplex = "Themes2.xlsx";\r
+    private final String testFileSimple = "Themes.xlsx";\r
+    private final String testFileComplex = "Themes2.xlsx";\r
     // TODO .xls version available too, add HSSF support then check \r
     \r
     // What colours they should show up as\r
index f1351f18620c36e2ea513bd2f446d35a690448cb..41e02b12ffc1e606986c3f89e032a5149a46577b 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.poi.xssf.usermodel.*;
 public final class TestXSSFChartAxis extends TestCase {
 
        private static final double EPSILON = 1E-7;
-       private XSSFChartAxis axis;
+       private final XSSFChartAxis axis;
 
        public TestXSSFChartAxis() {
                super();
index 6693ce05dfc7046ccb7a6f217a73cf92ffc93ffe..99bb4a2bc4b5dc4dda412ff8f79aa2d0d016ee8c 100644 (file)
@@ -23,7 +23,7 @@ import junit.framework.TestCase;
 
 public abstract class StreamTest extends TestCase {
        public static class TestPointer extends Pointer {
-               private boolean compressed;
+               private final boolean compressed;
                protected boolean hasPointers = false;
                public TestPointer(boolean compressed, int offset, int length, int type, short format) {
                        this.compressed = compressed;
index 3af4c6b361ca96f66c0f7ccdb52409827be9d18c..d1092e2bba7b08015022842083fc3d915eca4bc9 100644 (file)
@@ -29,8 +29,8 @@ import org.apache.poi.POIDataSamples;
 
 public final class TestStreamComplex extends StreamTest {
        private byte[] contents;
-       private int trailerPointerAt = 0x24;
-       private int trailerDataAt = 0x8a94;
+       private final int trailerPointerAt = 0x24;
+       private final int trailerDataAt = 0x8a94;
        private ChunkFactory chunkFactory;
        private PointerFactory ptrFactory;
 
index de43a3753709871175ed1c3ab1db2784965add2c..58498e0298a1cc2c59497adf10feb6e3430526c6 100644 (file)
@@ -36,9 +36,9 @@ import org.apache.poi.POIDataSamples;
  */
 public final class TestReWriteSanity extends TestCase {
        // HSLFSlideShow primed on the test data
-       private HSLFSlideShowImpl ss;
+       private final HSLFSlideShowImpl ss;
        // POIFS primed on the test data
-       private POIFSFileSystem pfs;
+       private final POIFSFileSystem pfs;
 
     public TestReWriteSanity() throws Exception {
         POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
index 4c5044fc7183e9230921746df4f59f79dcd61947..473c9d3306e0de7c6c11fd697be0e2b8483f20a9 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.poi.POIDataSamples;
  */
 public final class TestRecordCounts extends TestCase {
        // HSLFSlideShow primed on the test data
-       private HSLFSlideShowImpl ss;
+       private final HSLFSlideShowImpl ss;
 
        public TestRecordCounts() throws Exception {
         POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
index f9df1a469eb6abb4f2a5bd2e6838803b5576edb5..33807ac576903a7f3942ae64403b5656ca7f3972 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.poi.util.StringUtil;
  */
 public final class TestCruddyExtractor extends TestCase {
        // Extractor primed on the test data
-       private QuickButCruddyTextExtractor te;
+       private final QuickButCruddyTextExtractor te;
        // All the text to be found in the file
        String[] allTheText = new String[] {
                "This is a test title",
index 87d40fa16030f167b1c740e2b1eaad3e3047a62c..df3150c59e78c434396e484d829093aa09fbf95e 100644 (file)
@@ -37,7 +37,7 @@ public final class TestAnimationInfoAtom extends TestCase {
        00 00 00
      </AnimationInfoAtom>
      */
-    private byte[] data = new byte[] {
+    private final byte[] data = new byte[] {
          0x01, 0x00, (byte)0xF1, 0x0F, 0x1C, 0x00, 0x00, 0x00,
             0x00, 0x00, 0x00, 0x07, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
             0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
index 13090c812a45614e98118b37381d0665ad441457..4289c27710ccdb0efa1df75c9357105b40bb9bae 100644 (file)
@@ -28,10 +28,10 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestCString extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] { 0, 0, 0xBA-256, 0x0f, 0x10, 0, 0, 0,
+       private final byte[] data_a = new byte[] { 0, 0, 0xBA-256, 0x0f, 0x10, 0, 0, 0,
                0x48, 00, 0x6F, 00, 0x67, 00, 0x77, 00,
                0x61, 00, 0x72, 00, 0x74, 00, 0x73, 00  };
-       private byte[] data_b = new byte[] { 0x10, 0, 0xBA-256, 0x0f, 0x10, 0, 0, 0,
+       private final byte[] data_b = new byte[] { 0x10, 0, 0xBA-256, 0x0f, 0x10, 0, 0, 0,
                0x43, 00, 0x6F, 00, 0x6D, 00, 0x6D, 00,
                0x65, 00, 0x6E, 00, 0x74, 00, 0x73, 00 };
 
index e506075e04b6176cf26fed4342ef193162fecf03..9e0af0d9d59908516b8498305239137538ad3343 100644 (file)
@@ -28,7 +28,7 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestColorSchemeAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] { 60, 0, 0xF0-256, 0x07, 0x20, 0, 0, 0,
+       private final byte[] data_a = new byte[] { 60, 0, 0xF0-256, 0x07, 0x20, 0, 0, 0,
                0xFF-256, 0xFF-256, 0xFF-256, 00,   00, 00, 00, 00,
                0x80-256, 0x80-256, 0x80-256, 00,   00, 00, 00, 00,
                0xBB-256, 0xE0-256, 0xE3-256, 00,   0x33, 0x33, 0x99-256, 00,
index 4ceea41fe57d47c8515b4c7800d88a5b7a157284..0081b8420dc247a116353dee8ef5774b836af58a 100644 (file)
@@ -40,7 +40,7 @@ import org.junit.Test;
  */
 public final class TestComment2000 {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                0x0F, 00, 0xE0-256, 0x2E, 0x9C-256, 00, 00, 00,
                00, 00, 0xBA-256, 0x0F, 0x14, 00, 00, 00,
                0x44, 00, 0x75, 00, 0x6D, 00, 0x62, 00,
@@ -64,7 +64,7 @@ public final class TestComment2000 {
                0x0F, 00, 0xCD-256, 00, 0x92-256, 00,
                00,     00, 0x92-256, 00, 00, 00
        };
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                0x0F, 00, 0xE0-256, 0x2E, 0xAC-256, 00, 00, 00,
                00, 00, 0xBA-256, 0x0F, 0x10, 00, 00, 00,
                0x48, 00, 0x6F, 00, 0x67, 00, 0x77, 00,
index 26ca6dbb31e8a8816067328dded4ee0a83fbe1ca..05a3a671b574ac88a3e88216664f80fc58b532b6 100644 (file)
@@ -36,14 +36,14 @@ import org.junit.Test;
  */
 public final class TestComment2000Atom {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                00, 00, 0xE1-256, 0x2E, 0x1C, 00, 00, 00,
                01, 00, 00, 00, 0xD6-256, 07, 01, 00,
                02, 00, 0x18, 00, 0x0A, 00, 0x1A, 00,
                0x0F, 00, 0xCD-256, 00, 0x92-256, 00,
                00,     00, 0x92-256, 00, 00, 00
        };
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                00, 00, 0xE1-256, 0x2E, 0x1C, 00, 00, 00,
                05, 00, 00, 00, 0xD6-256, 0x07, 01, 00,
                02, 00, 0x18, 00, 0x15, 00, 0x19, 00, 03,
index 8018ba3b861d5e1fb58c427118a67765309d63fd..e9134eea4874f72879746ca0f1a1f2ca19fe6b9a 100644 (file)
@@ -30,9 +30,9 @@ import org.apache.poi.POIDataSamples;
  */
 public final class TestDocument extends TestCase {
        // HSLFSlideShow primed on the test data
-       private HSLFSlideShowImpl ss;
+       private final HSLFSlideShowImpl ss;
        // POIFS primed on the test data
-       private POIFSFileSystem pfs;
+       private final POIFSFileSystem pfs;
 
        public TestDocument() throws Exception {
         POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
index 890c0a73b7e4023e34e24e84b91d12ea18e0be90..40f4cd787fe1c5ed15df5e59523afe5c1e4d2f12 100644 (file)
@@ -28,7 +28,7 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestDocumentAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] { 1, 0, 0xE9-256, 3, 0x28, 0, 0, 0,
+       private final byte[] data_a = new byte[] { 1, 0, 0xE9-256, 3, 0x28, 0, 0, 0,
                0x80-256, 0x16, 0, 0, 0xE0-256, 0x10, 0, 0,
                0xE0-256, 0x10, 0, 0, 0x80-256, 0x16, 0, 0,
                0x05, 0, 0, 0, 0x0A, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
index c0cb35837258ba2a791685da12ec1db2b16aebb4..7e394cbdeb657ce8a2f5e249ba3f2f19d93a1652 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.Test;
  */
 public final class TestDocumentEncryptionAtom {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                0x0F, 00, 0x14, 0x2F, 0xBE-256, 00, 00, 00,
                02, 00, 02, 00, 0x0C, 00, 00, 00,
                0x76, 00, 00, 00, 0x0C, 00, 00, 00,
@@ -67,7 +67,7 @@ public final class TestDocumentEncryptionAtom {
                0xB2-256, 0x8E-256, 0x67, 0x54, 0x07, 0x04, 0x00
        };
 
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                        15, 0, 20, 47, -66, 0, 0, 0,
                        2, 0, 2, 0, 4,
                        0, 0, 0, 118, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0,
index 6b4d7a21a4deb5fa01c6d9025901ce37b13e37e9..29c7ee2369c2502f8f707ff664c145ccaf5fe2e3 100644 (file)
@@ -55,7 +55,7 @@ public final class TestExControl extends TestCase {
        </CString>
      </ExControl>
      */
-    private byte[] data = new byte[] {
+    private final byte[] data = new byte[] {
             0x0F, 0x00, (byte)0xEE, 0x0F, (byte)0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0xFB, 0x0F, 0x04, 0x00, 0x00, 0x00,
             0x00, 0x01, 0x00, 0x00, 0x01, 0x00, (byte)0xC3, 0x0F, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00,
             0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, (byte)0x96, 0x13, 0x00,
index ab08f9068dbd1b4b10e1597c6a4d3eff1b18bd0f..dfd840b1b72eabb970947ca35a32ca6d29157bdd 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.poi.POIDataSamples;
  */
 public final class TestExHyperlink extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                0x0F, 00, 0xD7-256, 0x0F, 0xA8-256, 00, 00, 00,
 
                00, 00, 0xD3-256, 0x0F, 04, 00, 00, 00,
index ee6c5586cb3aad952fba9f4e378c027d406ab475..eba79e05a643743d444d0a5d1813f86d10200d06 100644 (file)
@@ -28,11 +28,11 @@ import java.io.ByteArrayOutputStream;
  */
 public class TestExHyperlinkAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                00, 00, 0xD3-256, 0x0F, 04, 00, 00, 00,
                01, 00, 00, 00
        };
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                00, 00, 0xD3-256, 0x0F, 04, 00, 00, 00,
                04, 00, 00, 00
        };
index e978f37e4c95509c7409a658621164f1218caa06..7f1110863c5dad87ea5cff1d6d621ee7c826e322 100644 (file)
@@ -28,11 +28,11 @@ import java.io.ByteArrayOutputStream;
  */
 public class TestExObjListAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                00, 00, 0x0A, 0x04, 04, 00, 00, 00,
                01, 00, 00, 00
        };
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                00, 00, 0x0A, 0x04, 04, 00, 00, 00,
                04, 00, 00, 00
        };
index b69e5f40ccefc11e51eb35402ba417f0ec409a87..ca33bb4d6b5380c73e4bf959a20342e6789babc1 100644 (file)
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
  */
 public final class TestExOleObjAtom extends TestCase {
        // From a real file (embedded SWF control)
-       private byte[] data = {
+       private final byte[] data = {
                        0x01, 0x00, (byte)0xC3, 0x0F, 0x18, 0x00, 0x00, 0x00,
                        0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
                        0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, (byte)0x96, 0x13, 0x00  };
index 83d932fdea7c0a8204d4aed8153e410a2d9731ee..07147f1fe1076afa37670bf069c783351063c2b1 100644 (file)
@@ -55,7 +55,7 @@ public final class TestExOleObjStg extends TestCase {
       88 97 08 35 91 83 81 07 EC 27 10 BF 18 E8 9B E1 0F 00 BD 65 3D D4
     </ExOleObjStg>
      */
-    private byte[] data = new byte[] {
+    private final byte[] data = new byte[] {
             0x10, 0x00, 0x11, 0x10, 0x5B, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x78, (byte)0x9C, (byte)0xBB, 0x70,
             0x5E, (byte)0xF0, (byte)0xC1, (byte)0xC2, (byte)0x8D, 0x52, 0x0F, 0x19, (byte)0xD0, (byte)0x80, 0x1D, 0x03,
             0x33, (byte)0xC3, (byte)0xBF, (byte)0xFF, (byte)0x9C, 0x0C, 0x6C, 0x48, 0x62, (byte)0x8C, 0x40, (byte)0xCC,
index a16c8ed4697cc8fbb13f39998140976d3d0fe654..10dc9404c8c02c802d8874208228afa2dd2892f2 100644 (file)
@@ -32,7 +32,7 @@ import junit.framework.TestCase;
 public final class TestExVideoContainer extends TestCase {
 
     // From a real file
-    private byte[] data = new byte[]{
+    private final byte[] data = new byte[]{
             0x0F, 0x00, 0x05, 0x10, (byte) 0x9E, 0x00, 0x00, 0x00,
             0x00, 0x00, 0x04, 0x10, 0x08, 0x00, 0x00, 0x00,
             0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
index c005c023f9edda053831b517efb579ba3d75a473..2d595f332542a1b4b0ef284aa4582eb8126f587f 100644 (file)
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
  */
 public final class TestFontCollection extends TestCase {
     // From a real file
-    private byte[] data = new byte[]  {
+    private final byte[] data = new byte[]  {
         0x0F, 0x00, 0xD5-256, 0x07, 0x4C, 0x00, 0x00, 0x00,
         0x00, 0x00, 0xB7-256, 0x0F, 0x44, 0x00, 0x00, 0x00,
         0x54, 0x00, 0x69, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x73, 0x00,
index 07a7b42d45e519aaae066a3d7cc500517718007e..c694b90d4fefb45013b727845e08f78c92e6d6e9 100644 (file)
@@ -31,7 +31,7 @@ import junit.framework.TestCase;
  */
 public final class TestHeadersFootersAtom extends TestCase {
        // From a real file
-       private byte[] data = new byte[] {
+       private final byte[] data = new byte[] {
             0x00, 0x00, (byte)0xDA, 0x0F, 0x04, 0x00, 0x00, 00,
             0x00, 0x00, 0x23, 0x00 };
 
index ef6f31f7c7311258168bb2cfa4efc1a4e5026f1b..6e787e7c83daad8a68507a32d1664801c7f56c6c 100644 (file)
@@ -31,7 +31,7 @@ import junit.framework.TestCase;
  */
 public final class TestHeadersFootersContainer extends TestCase {
        // SlideHeadersFootersContainer
-       private byte[] slideData = new byte[] {
+       private final byte[] slideData = new byte[] {
             0x3F, 0x00, (byte)0xD9, 0x0F, 0x2E, 0x00, 0x00, 0x00,
             0x00, 0x00, (byte)0xDA, 0x0F, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00,
             0x20, 0x00, (byte)0xBA, 0x0F, 0x1A, 0x00, 0x00, 0x00,
@@ -41,7 +41,7 @@ public final class TestHeadersFootersContainer extends TestCase {
     };
 
     // NotesHeadersFootersContainer
-    private byte[] notesData = new byte[] {
+    private final byte[] notesData = new byte[] {
             0x4F, 0x00, (byte)0xD9, 0x0F, 0x48, 0x00, 0x00, 0x00,
             0x00, 0x00, (byte)0xDA, 0x0F, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x00,
             0x10, 0x00, (byte)0xBA, 0x0F, 0x16, 0x00, 0x00, 0x00,
index 9ecb03b22ccf31db4ad2cc2b710557212eea9854..24278fa14ef40eeb61b171a36e65d0da9cc8d24f 100644 (file)
@@ -32,7 +32,7 @@ import junit.framework.TestCase;
  */
 public class TestInteractiveInfo extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                0x0F, 00, 0xF2-256, 0x0F, 0x18, 00, 00, 00,
                00, 00, 0xF3-256, 0x0F, 0x10, 00, 00, 00,
                00, 00, 00, 00, 01, 00, 00, 00,
index 7a5992193666b931094bad317e587045b5fc3a2c..cabed2578c614b2565bef21c6143a5dfc3746abc 100644 (file)
@@ -28,12 +28,12 @@ import java.io.ByteArrayOutputStream;
  */
 public class TestInteractiveInfoAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                00, 00, 0xF3-256, 0x0F, 0x10, 00, 00, 00,
                00, 00, 00, 00, 01, 00, 00, 00,
                04, 00, 00, 00, 8, 00, 00, 00
        };
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                00, 00, 0xF3-256, 0x0F, 0x10, 00, 00, 00,
                00, 00, 00, 00, 04, 00, 00, 00,
                04, 00, 00, 00, 8, 00, 00, 00
index e12ecd75c558dd67cca2728137f9351a7e5f30fc..fc207ea3cacd48903603ed9bd52dd827827e144f 100644 (file)
@@ -28,7 +28,7 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestNotesAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] { 1, 0, 0xF1-256, 3, 8, 0, 0, 0,
+       private final byte[] data_a = new byte[] { 1, 0, 0xF1-256, 3, 8, 0, 0, 0,
                0, 0, 0, 0x80-256, 0, 0, 0x0D, 0x30 };
 
        public void testRecordType() {
index 6271e5340268d1aa760a00f35d9112361712c6ca..7e6137ba47626aa50fa36f4336b649a15c1d58d6 100644 (file)
@@ -32,7 +32,7 @@ import junit.framework.TestCase;
  */
 public final class TestSlideAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] { 1, 0, 0xEF-256, 3, 0x18, 0, 0, 0,
+       private final byte[] data_a = new byte[] { 1, 0, 0xEF-256, 3, 0x18, 0, 0, 0,
                0, 0, 0, 0, 0x0F, 0x10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80-256,
                0, 1, 0, 0, 7, 0, 0x0C, 0x30 };
 
index 25aa8a5350e3a183f7c480ad7d49ae857cfe66f8..87d8a17502d0c9afc4b4ea30a7525b28de62df1d 100644 (file)
@@ -28,7 +28,7 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestSlidePersistAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] { 0, 0, 0xF3-256, 3, 0x14, 0, 0, 0,
+       private final byte[] data_a = new byte[] { 0, 0, 0xF3-256, 3, 0x14, 0, 0, 0,
                4, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0,
                1, 0, 0, 0, 0, 0, 0 };
 
index 15877fdcf34286048c0de7ec535979e76457d893..533d250a9255bb1ade92f37698337289b147d468 100644 (file)
@@ -125,7 +125,7 @@ public final class TestStyleTextPropAtom {
         28, 0, 1, 0, 0, 0, 0, 0,
         3, 0, 1, 0, 24, 0
     };
-    private int data_c_text_len = 123-1;
+    private final int data_c_text_len = 123-1;
 
     /**
      * From a real file supplied for Bug 40143 by tales@great.ufc.br
index 85d5b7a5521fbf8bb02838cb90169a2094a2a42d..9078bd16631b46fb467fa6cdc1af35767f2e644c 100644 (file)
@@ -28,15 +28,15 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestTextBytesAtom extends TestCase {
        // From a real file
-       private byte[] data = new byte[]  { 0, 0, 0xA8-256, 0x0f, 0x1c, 0, 0, 0,
+       private final byte[] data = new byte[]  { 0, 0, 0xA8-256, 0x0f, 0x1c, 0, 0, 0,
                0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68,
                0x65, 0x20, 0x74, 0x69, 0x74, 0x6C,     0x65, 0x20, 0x6F, 0x6E,
                0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x32 };
-       private String data_text = "This is the title on page 2";
-       private byte[] alt_data = new byte[] { 0, 0, 0xA8-256, 0x0F, 0x14, 0, 0, 0,
+       private final String data_text = "This is the title on page 2";
+       private final byte[] alt_data = new byte[] { 0, 0, 0xA8-256, 0x0F, 0x14, 0, 0, 0,
                0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20,
                0x74, 0x65, 0x73, 0x74, 0x20, 0x74, 0x69, 0x74, 0x6C, 0x65 };
-       private String alt_text = "This is a test title";
+       private final String alt_text = "This is a test title";
 
     public void testRecordType() {
                TextBytesAtom tba = new TextBytesAtom(data,0,data.length);
index b37a234ba55e4f4f0457278064f9fc173b4b6f5b..8158cb1127b1f6ded03df631c3581a112f1b90a4 100644 (file)
@@ -28,12 +28,12 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestTextCharsAtom extends TestCase {
        // From a real file
-       private byte[] data = new byte[]  { 0, 0, 0xA0-256, 0x0f, 0x08, 0, 0, 0,
+       private final byte[] data = new byte[]  { 0, 0, 0xA0-256, 0x0f, 0x08, 0, 0, 0,
                0x54, 0x00, 0x68, 0x00, 0x69, 0x00, 0x73, 0x00 };
-       private String data_text = "This";
-       private byte[] alt_data = new byte[] { 0, 0, 0xA0-256, 0x0F, 0x0a, 0, 0, 0,
+       private final String data_text = "This";
+       private final byte[] alt_data = new byte[] { 0, 0, 0xA0-256, 0x0F, 0x0a, 0, 0, 0,
                0x54, 0x00, 0x68, 0x00, 0x69, 0x00, 0x73, 0x00, 0xa3-256, 0x01 };
-       private String alt_text = "This\u01A3";
+       private final String alt_text = "This\u01A3";
 
     public void testRecordType() {
                TextCharsAtom tca = new TextCharsAtom(data,0,data.length);
index b2c819439f4ada238189bead209276752ea015b1..8ac74534056618b7d3e4577543477149fc0677ea 100644 (file)
@@ -28,9 +28,9 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestTextHeaderAtom extends TestCase {
        // From a real file
-       private byte[] notes_data = new byte[] { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 2, 0, 0, 0};
-       private byte[] title_data = new byte[] { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 0, 0, 0, 0 };
-       private byte[] body_data = new byte[]  { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 1, 0, 0, 0 };
+       private final byte[] notes_data = new byte[] { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 2, 0, 0, 0};
+       private final byte[] title_data = new byte[] { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 0, 0, 0, 0 };
+       private final byte[] body_data = new byte[]  { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 1, 0, 0, 0 };
 
        public void testRecordType() {
                TextHeaderAtom tha = new TextHeaderAtom(notes_data,0,12);
index 7987bde6d5cc8022e798e311cdaaee333b54e39a..475918cd1c399f3038fdbfa36687fe8c1c9cc821 100644 (file)
@@ -31,14 +31,14 @@ import junit.framework.TestCase;
 public final class TestTextRulerAtom extends TestCase {
 
        //from a real file
-       private byte[] data_1 = new byte[] {
+       private final byte[] data_1 = new byte[] {
                0x00, 0x00, (byte)0xA6, 0x0F, 0x18, 0x00, 0x00, 0x00,
                (byte)0xF8, 0x1F, 0x00, 0x00, 0x75, 0x00, (byte)0xE2, 0x00, 0x59,
                0x01, (byte)0xC3, 0x01, 0x1A, 0x03, (byte)0x87, 0x03, (byte)0xF8,
                0x03, 0x69, 0x04, (byte)0xF6, 0x05, (byte)0xF6, 0x05
        };
 
-       private byte[] data_2 = new byte[] {
+       private final byte[] data_2 = new byte[] {
                0x00, 0x00, (byte)0xA6, 0x0F, 0x0A, 0x00, 0x00, 0x00,
                0x10, 0x03, 0x00, 0x00, (byte)0xF9, 0x00, 0x41, 0x01, 0x41, 0x01
        };
index 593f116cab45cd80847c86056760952dc75906bb..4f88d4cfd188ab60924669fc991109ed247612fb 100644 (file)
@@ -31,7 +31,7 @@ import junit.framework.TestCase;
 public final class TestTextSpecInfoAtom extends TestCase {
 
     //from a real file
-    private byte[] data_1 = new byte[] {
+    private final byte[] data_1 = new byte[] {
         0x00, 0x00, (byte)0xAA, 0x0F, 0x2C, 0x00, 0x00, 0x00,
         0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
         0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00,
index 4e3d07ade089643abe299ff92d5ebf1906acb7af..7f6eab12f96ee18226a19b11503072b0ee65ab08 100644 (file)
@@ -28,12 +28,12 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestTxInteractiveInfoAtom extends TestCase {
        // From WithLinks.ppt
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                00, 00, (byte)0xDF, 0x0F, 0x08, 00, 00, 00,
                0x19, 00, 00, 00, 0x38, 00, 00, 00
        };
 
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                00, 00, (byte)0xDF, 0x0F, 0x08, 00, 00, 00,
                0x39, 00, 00, 00, 0x4E, 00, 00, 00
        };
index 3607dd4e3ab2198c0822718f2a52d09a2fbefff2..fca70287c0eddd912297d820adf74dad3c2bc825 100644 (file)
@@ -28,7 +28,7 @@ import java.io.ByteArrayOutputStream;
  */
 public final class TestUserEditAtom extends TestCase {
        // From a real file
-       private byte[] data_a = new byte[] { 0, 0, 0xF5-256, 0x0F, 0x1C, 0, 0, 0,
+       private final byte[] data_a = new byte[] { 0, 0, 0xF5-256, 0x0F, 0x1C, 0, 0, 0,
                00, 01, 00, 00, 0xD9-256, 18, 00, 03,
                00, 00, 00, 00, 00, 0x18, 00, 00, 01, 00, 00, 00,
                05, 00, 00, 00, 01, 00, 0xF6-256, 77 };
index cb51595f5700d0e04ed4c3d8f282dea2106ae4b0..a52cee4129fc9095d4d590427598f6f8e13b39d8 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.poi.POIDataSamples;
  */
 public final class TestCounts extends TestCase {
        // SlideShow primed on the test data
-       private HSLFSlideShow ss;
+       private final HSLFSlideShow ss;
 
        public TestCounts() throws Exception {
         POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
index 6cdefca5458dc07fb01fb5daf461737fbe4ec607..a7e2a62d51d710dce0c76cc7518a54eff6cce9f1 100644 (file)
@@ -30,9 +30,9 @@ import junit.framework.TestCase;
  */
 public final class TestMostRecentRecords extends TestCase {
        // HSLFSlideShow primed on the test data
-       private HSLFSlideShowImpl hss;
+       private final HSLFSlideShowImpl hss;
        // SlideShow primed on the test data
-       private HSLFSlideShow ss;
+       private final HSLFSlideShow ss;
 
        public TestMostRecentRecords() throws Exception {
         POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
index 0623b5695388a72acf72417cf38c719e51c1db57..59c5c65a708fbf4123104be618a87510e0d7bdf9 100644 (file)
@@ -29,7 +29,7 @@ import junit.framework.TestCase;
  */
 public final class TestNotesText extends TestCase {
        // SlideShow primed on the test data
-       private HSLFSlideShow ss;
+       private final HSLFSlideShow ss;
 
        public TestNotesText() throws Exception {
         POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
index 1de83d99717bd83e8f02f433f0b58486afd0b678..776da2fc548bab86b758073a5e1dc7ad7dbac552 100644 (file)
@@ -35,12 +35,12 @@ import org.junit.Test;
  */
 public final class TestSystemTimeUtils {
        // From real files
-       private byte[] data_a = new byte[] {
+       private final byte[] data_a = new byte[] {
                0xD6-256, 07, 01, 00,
                02, 00, 0x18, 00, 0x0A, 00, 0x1A, 00,
                0x0F, 00, 0xCD-256, 00
        };
-       private byte[] data_b = new byte[] {
+       private final byte[] data_b = new byte[] {
                00, 00, 0xE1-256, 0x2E, 0x1C, 00, 00, 00,
                01, 00, 00, 00, 0xD6-256, 0x07, 01, 00,
                02, 00, 0x18, 00, 0x15, 00, 0x19, 00, 03,
index a6e468767e6f3f080c7dabc51e1adc03541282af..7cdfdb1989f7dbf611a2515a37abde697d3a2bdc 100644 (file)
@@ -29,14 +29,14 @@ import org.apache.poi.hsmf.exceptions.ChunkNotFoundException;
  *  a range of files
  */
 public final class TestBasics extends TestCase {
-   private MAPIMessage simple;
-   private MAPIMessage quick;
-   private MAPIMessage outlook30;
-   private MAPIMessage attachments;
-   private MAPIMessage noRecipientAddress;
-   private MAPIMessage unicode;
-   private MAPIMessage cyrillic;
-   private MAPIMessage chinese;
+   private final MAPIMessage simple;
+   private final MAPIMessage quick;
+   private final MAPIMessage outlook30;
+   private final MAPIMessage attachments;
+   private final MAPIMessage noRecipientAddress;
+   private final MAPIMessage unicode;
+   private final MAPIMessage cyrillic;
+   private final MAPIMessage chinese;
 
    /**
     * Initialize this test, load up the blank.msg mapi message.
index 79fe7ebd9b55029f570b6fd5e372095e497cb58b..c4f13a627274f81552f4caa9e8c7175feb89a9e1 100644 (file)
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
  * Tests to verify that the library can read blank msg files.
  */
 public final class TestBlankFileRead extends TestCase {
-    private MAPIMessage mapiMessage;
+    private final MAPIMessage mapiMessage;
 
     /**
      * Initialize this test, load up the blank.msg mapi message.
index 3c6ed37ba6e5be1e607b31da98caca64513b8fec..12ffb62e897a8bdcc1727b176ac81cb241473f4f 100644 (file)
@@ -31,8 +31,8 @@ import org.apache.poi.hsmf.exceptions.ChunkNotFoundException;
  * @author Nicolas Bureau
  */
 public class TestFileWithAttachmentsRead extends TestCase {
-   private MAPIMessage twoSimpleAttachments;
-   private MAPIMessage pdfMsgAttachments;
+   private final MAPIMessage twoSimpleAttachments;
+   private final MAPIMessage pdfMsgAttachments;
 
    /**
     * Initialize this test, load up the attachment_test_msg.msg mapi message.
index 0cbad21b9668477f3bfb2f50d1f6462874ea79ea..dc4f1c969f7ae256c88fb1bec99e474d6b37e136 100644 (file)
@@ -29,8 +29,8 @@ import junit.framework.TestCase;
 \r
 public final class TestMessageSubmissionChunk extends TestCase {\r
     \r
-    private MAPIMessage mapiMessageExtraHyphenSubmissionChunk;\r
-    private MAPIMessage mapiMessageNormalSubmissionChunk;\r
+    private final MAPIMessage mapiMessageExtraHyphenSubmissionChunk;\r
+    private final MAPIMessage mapiMessageNormalSubmissionChunk;\r
 \r
     /**\r
      * Initialise this test, load up the test messages.\r
index c10ba0b65fc621715c7c27ddc4a4de7297eea08e..ef770d441f701823472b72f295d0c92944226270 100644 (file)
@@ -29,9 +29,9 @@ import junit.framework.TestCase;
 \r
 public final class TestMessageSubmissionChunkY2KRead extends TestCase {\r
     \r
-    private MAPIMessage mapiMessage1979;\r
-    private MAPIMessage mapiMessage1980;\r
-    private MAPIMessage mapiMessage1981;\r
+    private final MAPIMessage mapiMessage1979;\r
+    private final MAPIMessage mapiMessage1980;\r
+    private final MAPIMessage mapiMessage1981;\r
 \r
     /**\r
      * Initialise this test, load up the three test messages.\r
index a791874ced3e228147a1e9d318a1d1c3b80427b4..1496e082dc5ec6eacedeb7878766236576ec3fb2 100644 (file)
@@ -29,7 +29,7 @@ import junit.framework.TestCase;
  * Tests to verify that we can still work on the newer Outlook 3.0 files.
  */
 public final class TestOutlook30FileRead extends TestCase {
-    private MAPIMessage mapiMessage;
+    private final MAPIMessage mapiMessage;
 
     /**
      * Initialize this test, load up the blank.msg mapi message.
index 318031015cfb6a81c3256245dc9d5e427de53ca1..bdfff107886ee787792b0f79e34c5732c809c4cf 100644 (file)
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
  *  format with no attachments or extra recipents.
  */
 public final class TestSimpleFileRead extends TestCase {
-    private MAPIMessage mapiMessage;
+    private final MAPIMessage mapiMessage;
 
     /**
      * Initialize this test, load up the blank.msg mapi message.
index b8f34a17e2d196967d90daff12b7d202d924f1e8..755bb638042b34cba000e06a1e584f9f51cb8ec7 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.Test;
  * Tests to verify that the text extractor works
  */
 public final class TestOutlookTextExtractor {
-   private POIDataSamples samples = POIDataSamples.getHSMFInstance();
+   private final POIDataSamples samples = POIDataSamples.getHSMFInstance();
        
    private static TimeZone userTZ;
    
index e4b8142b90e013bb895f5fdf8a70b5a7320452a3..58ff1cc1624cdfcfb879912dfc327db986107389 100644 (file)
@@ -46,7 +46,7 @@ import org.junit.Test;
  * Tests to verify that the chunk parser works properly
  */
 public final class TestPOIFSChunkParser {
-   private POIDataSamples samples = POIDataSamples.getHSMFInstance();
+   private final POIDataSamples samples = POIDataSamples.getHSMFInstance();
 
    @Test
    public void testFindsCore() throws Exception {
index d306bfabc001b477c06a4f4cbd8f8686ac3d16bc..763ec672c1ca5236dd6338e476a2283ad89e0ad7 100644 (file)
@@ -32,7 +32,7 @@ public final class HWPFDocFixture
   public byte[] _tableStream;
   public byte[] _mainStream;
   public FileInformationBlock _fib;
-  private String _testFile;
+  private final String _testFile;
 
   public HWPFDocFixture(Object obj, String testFile)
   {
index 3ee35eded0800839473aebfb5dc422aab3b877de..759e1afb0498552319a95b7f7728b024778b751b 100644 (file)
@@ -31,7 +31,7 @@ public final class TestCHPBinTable
   private CHPBinTable _cHPBinTable = null;
   private HWPFDocFixture _hWPFDocFixture;
 
-  private TextPieceTable fakeTPT = new TextPieceTable() {
+  private final TextPieceTable fakeTPT = new TextPieceTable() {
       @Override
       public boolean isIndexInTable(int bytePos) {
           return true;
index 57ad140c6fe6c8367c1d7f26399455c0201cf404..2b96f21597872f4c58dbc1fbbe93e6e4535c573d 100644 (file)
@@ -36,7 +36,7 @@ public final class TestSavedByTable
 {
 
   /** The expected entries in the test document. */
-  private List expected = Arrays.asList(new Object[] {
+  private final List expected = Arrays.asList(new Object[] {
     new SavedByEntry("cic22", "C:\\DOCUME~1\\phamill\\LOCALS~1\\Temp\\AutoRecovery save of Iraq - security.asd"),
     new SavedByEntry("cic22", "C:\\DOCUME~1\\phamill\\LOCALS~1\\Temp\\AutoRecovery save of Iraq - security.asd"),
     new SavedByEntry("cic22", "C:\\DOCUME~1\\phamill\\LOCALS~1\\Temp\\AutoRecovery save of Iraq - security.asd"),
index b4591ad45517e43e029824fd8bbc0417ac2dc1ff..7bd9d55d9491df5044cc6778f44bc69acc0f6a2d 100644 (file)
@@ -811,16 +811,16 @@ public class TestBugs extends TestCase
     
     // These are the values the are expected to be read when the file
     // is checked.
-    private int section1LeftMargin = 1440;
-    private int section1RightMargin = 1440;
-    private int section1TopMargin = 1440;
-    private int section1BottomMargin = 1440;
-    private int section1NumColumns = 1;
+    private final int section1LeftMargin = 1440;
+    private final int section1RightMargin = 1440;
+    private final int section1TopMargin = 1440;
+    private final int section1BottomMargin = 1440;
+    private final int section1NumColumns = 1;
     private int section2LeftMargin = 1440;
     private int section2RightMargin = 1440;
     private int section2TopMargin = 1440;
     private int section2BottomMargin = 1440;
-    private int section2NumColumns = 3;
+    private final int section2NumColumns = 3;
     
     public void testHWPFSections() {
         HWPFDocument document = null;
index 4d0648b39a631be892d80bdac3a17cd65ef78ca1..bf52606d31133b9696f4f70f4d53dcea6c321f14 100644 (file)
@@ -30,19 +30,19 @@ import junit.framework.TestCase;
 public final class TestRangeDelete extends TestCase {
 
        // u201c and u201d are "smart-quotes"
-       private String introText =
+       private final String introText =
                "Introduction\r";
-       private String fillerText =
+       private final String fillerText =
                "${delete} This is an MS-Word 97 formatted document created using NeoOffice v. 2.2.4 Patch 0 (OpenOffice.org v. 2.2.1).\r";
-       private String originalText =
+       private final String originalText =
                "It is used to confirm that text delete works even if Unicode characters (such as \u201c\u2014\u201d (U+2014), \u201c\u2e8e\u201d (U+2E8E), or \u201c\u2714\u201d (U+2714)) are present.  Everybody should be thankful to the ${organization} ${delete} and all the POI contributors for their assistance in this matter.\r";
-       private String lastText =
+       private final String lastText =
                "Thank you, ${organization} ${delete}!\r";
-       private String searchText = "${delete}";
-       private String expectedText1 = " This is an MS-Word 97 formatted document created using NeoOffice v. 2.2.4 Patch 0 (OpenOffice.org v. 2.2.1).\r";
-       private String expectedText2 =
+       private final String searchText = "${delete}";
+       private final String expectedText1 = " This is an MS-Word 97 formatted document created using NeoOffice v. 2.2.4 Patch 0 (OpenOffice.org v. 2.2.1).\r";
+       private final String expectedText2 =
                "It is used to confirm that text delete works even if Unicode characters (such as \u201c\u2014\u201d (U+2014), \u201c\u2e8e\u201d (U+2E8E), or \u201c\u2714\u201d (U+2714)) are present.  Everybody should be thankful to the ${organization}  and all the POI contributors for their assistance in this matter.\r";
-       private String expectedText3 = "Thank you, ${organization} !\r";
+       private final String expectedText3 = "Thank you, ${organization} !\r";
 
        private String illustrativeDocFile;
 
index 79c2af67f12418d5e06b67b05a92f5f67a0e8b11..18ae0e7ac5a57a272c2d01ab43f9feda3148f08b 100644 (file)
@@ -31,10 +31,10 @@ import org.apache.poi.hwpf.HWPFTestDataSamples;
 public final class TestRangeInsertion extends TestCase {
 
        // u201c and u201d are "smart-quotes"
-       private String originalText =
+       private final String originalText =
                "It is used to confirm that text insertion works even if Unicode characters (such as \u201c\u2014\u201d (U+2014), \u201c\u2e8e\u201d (U+2E8E), or \u201c\u2714\u201d (U+2714)) are present.\r";
-       private String textToInsert = "Look at me!  I'm cool!  ";
-       private int insertionPoint = 122;
+       private final String textToInsert = "Look at me!  I'm cool!  ";
+       private final int insertionPoint = 122;
 
        private String illustrativeDocFile;
 
index 9798a756d60a3eb1024c69fead98d8d572df11c6..370c4f3f4125662657c181bca51bc8affccaef41 100644 (file)
@@ -31,15 +31,15 @@ import org.apache.poi.hwpf.HWPFTestDataSamples;
 public final class TestRangeReplacement extends TestCase {
 
        // u201c and u201d are "smart-quotes"
-       private String originalText =
+       private final String originalText =
                "It is used to confirm that text replacement works even if Unicode characters (such as \u201c\u2014\u201d (U+2014), \u201c\u2e8e\u201d (U+2E8E), or \u201c\u2714\u201d (U+2714)) are present.  Everybody should be thankful to the ${organization} and all the POI contributors for their assistance in this matter.\r";
-       private String searchText = "${organization}";
-       private String replacementText = "Apache Software Foundation";
-       private String expectedText2 =
+       private final String searchText = "${organization}";
+       private final String replacementText = "Apache Software Foundation";
+       private final String expectedText2 =
                "It is used to confirm that text replacement works even if Unicode characters (such as \u201c\u2014\u201d (U+2014), \u201c\u2e8e\u201d (U+2E8E), or \u201c\u2714\u201d (U+2714)) are present.  Everybody should be thankful to the Apache Software Foundation and all the POI contributors for their assistance in this matter.\r";
-       private String expectedText3 = "Thank you, Apache Software Foundation!\r";
+       private final String expectedText3 = "Thank you, Apache Software Foundation!\r";
 
-       private String illustrativeDocFile = "testRangeReplacement.doc";
+       private final String illustrativeDocFile = "testRangeReplacement.doc";
 
        /**
         * Test just opening the files
index ef9da4767fc09a00a6551e3cb38b0b069ead71ce..fbaa36b61bf95457869cfb6f16a613d75caf191d 100644 (file)
@@ -50,7 +50,7 @@ public final class POIDataSamples {
     /** <code>true</code> if standard system propery is not set,\r
      * but the data is available on the test runtime classpath */\r
     private boolean _sampleDataIsAvaliableOnClassPath;\r
-    private String _moduleDir;\r
+    private final String _moduleDir;\r
 \r
     /**\r
      *\r
index cc90724814622ae7d8307f93ed98b7e931b30d19..a4618aed470f08fd64d815ff529c89626092f53e 100644 (file)
@@ -86,7 +86,7 @@ public final class TestAbortableListener extends TestCase {
        }
 
        private static final class AbortableCountingListener extends AbortableHSSFListener {
-               private int abortAfterIndex;
+               private final int abortAfterIndex;
                public int countSeen;
                public Record lastRecordSeen;
 
index fa59266c168f9dc302c87e1869c7ada854aa3272..b3bf6688047ee4bebcba759ebfa068938173a211 100644 (file)
@@ -150,7 +150,7 @@ public final class TestEventRecordFactory extends TestCase {
         final int[] recCnt = { 0 };
         final int[] offset = { 0 };
         ERFListener listener = new ERFListener() {
-              private String[] expectedRecordTypes = {
+              private final String[] expectedRecordTypes = {
                   UnknownRecord.class.getName(),
                   ContinueRecord.class.getName(),
                   ContinueRecord.class.getName()
index eaf4b52c1179ecb90cdbc275018a73038b3862ee..0867720f79ec3c60d8d527a476fb45a43fcff821 100644 (file)
@@ -365,7 +365,7 @@ public final class TestMissingRecordAwareHSSFListener extends TestCase {
        private static final class MockHSSFListener implements HSSFListener {
                public MockHSSFListener() {}
                private final List<Record> _records = new ArrayList<Record>();
-               private boolean logToStdOut = false;
+               private final boolean logToStdOut = false;
 
                @Override
         public void processRecord(Record record) {
index 8d69af8ba583685eee4d856bb7f81c15c1f1c085..45819504f61a0980864dc0656b07f64c973b0307 100644 (file)
@@ -26,7 +26,7 @@ import junit.framework.TestCase;
  * @author Yegor Kozlov
  */
 public final class TestAutoFilterInfoRecord extends TestCase {
-    private byte[] data = new byte[] {
+    private final byte[] data = new byte[] {
         0x05, 0x00
     };
 
index d8a1de9d03429d18c849a18f222975b1cd567df8..38230723482ff358f4bf147bc8a114ac289f3e4a 100644 (file)
@@ -28,7 +28,7 @@ import junit.framework.TestCase;
  * @author Yegor Kozlov
  */
 public final class TestFtCblsSubRecord extends TestCase {
-    private byte[] data = new byte[] {
+    private final byte[] data = new byte[] {
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
         0x01, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00
     };
index 4da04e014f514e25780642b09d0d9739964968cf..5f238f80c718438ea47a354c695e5a26df2fdd06 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.poi.util.HexRead;
  * @author Yegor Kozlov
  */
 public final class TestNoteRecord extends TestCase {
-    private byte[] testData = HexRead.readFromString(
+    private final byte[] testData = HexRead.readFromString(
             "06 00 01 00 02 00 02 04 " +
             "1A 00 00 " +
             "41 70 61 63 68 65 20 53 6F 66 74 77 61 72 65 20 46 6F 75 6E 64 61 74 69 6F 6E " +
index 1b5fb008e37a707cf66d1fc9765f09000fddcece..5a4d5c887c66d4f55c5ced7d3d8b10460dc90228 100644 (file)
@@ -29,7 +29,7 @@ import junit.framework.TestCase;
  * @author Yegor Kozlov
  */
 public final class TestNoteStructureSubRecord extends TestCase {
-    private byte[] data = new byte[] {
+    private final byte[] data = new byte[] {
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x80, 0x00, 0x00, 0x00,
         0x00, 0x00, (byte)0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x81, 0x01,
         (byte)0xCC, (byte)0xEC
index 98bcc6ba4e38cac4da7bedc720d5ea466861a1c4..28299b8cadabd83116b420447cf03bb62791b6e4 100644 (file)
@@ -64,7 +64,7 @@ public final class TestColumnInfoRecordsAggregate {
 
        private static final class CIRCollector implements RecordVisitor {
 
-               private List<Record> _list = new ArrayList<Record>();
+               private final List<Record> _list = new ArrayList<Record>();
 
                @Override
         public void visitRecord(Record r) {
index b1586f0f125684e37128bcb7628471d97aaa4a7b..1784d95aa64fd198b15402110b3cf7853bf616a8 100644 (file)
@@ -36,7 +36,7 @@ public final class RecordInspector {
 
        public static final class RecordCollector implements RecordVisitor {
 
-               private List<Record> _list;
+               private final List<Record> _list;
 
                public RecordCollector() {
                        _list = new ArrayList<Record>(128);
index 15588e81e8c27d217a16b13e66ad7f9f752fdd8e..5f90b7285f810917cbc3488f49bec312c6deb95f 100644 (file)
@@ -85,7 +85,7 @@ public class SanityChecker {
     {
         Class<? extends RecordBase> record;
         char occurance;  // 1 = one time, M = 1..many times, * = 0..many, 0 = optional
-        private boolean together;
+        private final boolean together;
 
         public CheckRecord( Class<? extends RecordBase> record, char occurance )
         {
index eec69b211c5b6b7948b78a397282794df34c87cc..f02b950f84ad26305585e6309a6cc0621bed9764 100644 (file)
@@ -417,7 +417,7 @@ public final class TestCellStyle extends TestCase {
     
     
     private static class CellFormatBugExample extends Thread {
-        private String fileName;
+        private final String fileName;
         private Throwable exception = null;
 
         public CellFormatBugExample(String fileName) {
index 1a28cb4219ac476bbae93802e0c313d44745b7cd..1a695407b8dbb1eade3ce8afbf1ad6205d7d0594 100644 (file)
@@ -33,8 +33,8 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
  *  the more usual, Workbook)
  */
 public final class TestNonStandardWorkbookStreamNames extends TestCase {
-       private String xlsA = "WORKBOOK_in_capitals.xls";
-   private String xlsB = "BOOK_in_capitals.xls";
+       private final String xlsA = "WORKBOOK_in_capitals.xls";
+   private final String xlsB = "BOOK_in_capitals.xls";
 
        /**
         * Test that we can open a file with WORKBOOK
index b310180b29c492272f5cdf502269af2b47c27660..347fb219f59c78dfbee2cc60a7b07c668692daa2 100644 (file)
@@ -51,7 +51,7 @@ public final class TestWorkbook {
     private static final String LAST_NAME_VALUE      = "Bush";
     private static final String FIRST_NAME_VALUE     = "George";
     private static final String SSN_VALUE            = "555555555";
-    private SanityChecker sanityChecker = new SanityChecker();
+    private final SanityChecker sanityChecker = new SanityChecker();
 
 
     private static HSSFWorkbook openSample(String sampleFileName) {
index ac9a4f5bf51d2f9a106aaaf65e100b1cac6c73c4..7a0e3d6d0c3ed7b9c90e6b92bb2d152a49b79925 100644 (file)
@@ -31,11 +31,11 @@ import org.apache.poi.poifs.filesystem.POIFSDocumentPath;
  * @author Marc Johnson
  */
 public final class TestPOIFSReaderRegistry extends TestCase {
-    private POIFSReaderListener[] listeners =
+    private final POIFSReaderListener[] listeners =
     {
         new Listener(), new Listener(), new Listener(), new Listener()
     };
-    private POIFSDocumentPath[]   paths     =
+    private final POIFSDocumentPath[]   paths     =
     {
         new POIFSDocumentPath(), new POIFSDocumentPath(new String[]
         {
@@ -48,7 +48,7 @@ public final class TestPOIFSReaderRegistry extends TestCase {
             "c"
         })
     };
-    private String[]              names     =
+    private final String[]              names     =
     {
         "a0", "a1", "a2", "a3"
     };
index f04efbe9c0181f4fffe9a5eb70eaae4a2c60a55a..b3a328c9efeeff8a901a3d704790c9ad337021dc 100644 (file)
@@ -40,11 +40,11 @@ import org.apache.poi.poifs.eventfilesystem.POIFSReaderListener;
 public class ReaderWriter
     implements POIFSReaderListener, POIFSWriterListener
 {
-    private POIFSFileSystem filesystem;
-    private DirectoryEntry  root;
+    private final POIFSFileSystem filesystem;
+    private final DirectoryEntry  root;
 
     // keys are DocumentDescriptors, values are byte[]s
-    private Map<DocumentDescriptor, byte[]>             dataMap;
+    private final Map<DocumentDescriptor, byte[]>             dataMap;
 
     /**
      * Constructor ReaderWriter
index 01f668c45dcf4e32dad6bd6d8e5a31f7511804d3..f818d21978ee83ea4fc70c39c3a5ef3f404831ed 100644 (file)
@@ -28,7 +28,7 @@ import java.util.Random;
  */
 public class SlowInputStream extends FilterInputStream
 {
-    private Random r = new Random(0);
+    private final Random r = new Random(0);
     
     public SlowInputStream(InputStream in) {
         super(in);
index 3cf452acff7d85e203a4057d8ea0d3467ebc5ab5..2800e94547123df24f77e678ed2b04e7b542e136 100644 (file)
@@ -26,8 +26,8 @@ import java.util.List;
 import junit.framework.TestCase;
 
 public class TestEntryUtils extends TestCase {
-    private byte[] dataSmallA = new byte[] { 12, 42, 11, -12, -121 };
-    private byte[] dataSmallB = new byte[] { 11, 73, 21, -92, -103 };
+    private final byte[] dataSmallA = new byte[] { 12, 42, 11, -12, -121 };
+    private final byte[] dataSmallB = new byte[] { 11, 73, 21, -92, -103 };
 
     public void testCopyRecursively() throws Exception {
        POIFSFileSystem fsD = new POIFSFileSystem();
index 1afd67c35f8cc17fcd144cb279d56df6fc25267b..73aafb82c5e947ff332f4d7806b5129e9a4fb01c 100644 (file)
@@ -38,7 +38,7 @@ import org.apache.poi.poifs.storage.RawDataBlockList;
  * Tests for the older OPOIFS-based POIFSFileSystem
  */
 public final class TestPOIFSFileSystem extends TestCase {
-   private POIDataSamples _samples = POIDataSamples.getPOIFSInstance();
+   private final POIDataSamples _samples = POIDataSamples.getPOIFSInstance();
 
        /**
         * Mock exception used to ensure correct error handling
index c9a849ba23a4321dd87b6d32cc3cece480f76529..7358f0024931d2bc4d20818468293ccd883874c3 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.poi.util.LittleEndianConsts;
  * @author Marc Johnson(mjohnson at apache dot org)
  */
 public final class LocalRawDataBlockList extends RawDataBlockList {
-    private List<RawDataBlock> _list;
+    private final List<RawDataBlock> _list;
     private RawDataBlock[] _array;
 
     public LocalRawDataBlockList()
index a7af8af8f8c47b6dc646a1b450c7480851f04c52..ea995c11f4c76f5508ca618898c47eff966dbd76 100644 (file)
@@ -190,9 +190,9 @@ public final class TestRawDataBlock extends TestCase {
         *  not to have any data
         */
        public static class SlowInputStream extends InputStream {
-               private Random rnd = new Random();
-               private byte[] data;
-               private int chunkSize;
+               private final Random rnd = new Random();
+               private final byte[] data;
+               private final int chunkSize;
                private int pos = 0;
 
                public SlowInputStream(byte[] data, int chunkSize) {
index 1abc92b0641271b03599d97bb73582addbf0a94b..4641c4fdc30d9d2c5ad571162ecab5e42c7bf727 100644 (file)
@@ -91,8 +91,8 @@ public class TestEvaluationCache extends TestCase {
 
                private final List<String> _logList;
                private final HSSFWorkbook _book;
-               private Map<ICacheEntry,EvaluationCell> _formulaCellsByCacheEntry;
-               private Map<ICacheEntry,Loc> _plainCellLocsByCacheEntry;
+               private final Map<ICacheEntry,EvaluationCell> _formulaCellsByCacheEntry;
+               private final Map<ICacheEntry,Loc> _plainCellLocsByCacheEntry;
 
                public EvalListener(HSSFWorkbook wb) {
                        _book = wb;
index a96a727ea2d5818cbd6aa7e78f75757477208e3f..6ce1e13d42e2ee5470e7cb86f9c587dcd008970b 100644 (file)
@@ -35,7 +35,7 @@ public abstract class BaseTestSheetHiding {
     protected Workbook wbH;
     protected Workbook wbU;
 
-    private String _file1, _file2;
+    private final String _file1, _file2;
 
     /**
         * @param testDataProvider an object that provides test data in HSSF /  specific way
index 3664aec712aa5a28fd9e87091246347dd08b5046..d3adcce0c0dd09a87a793069fc381c35c32b6cb7 100644 (file)
@@ -35,7 +35,7 @@ public class TestCellWalk extends TestCase {
        {null,       null, "str"}
     };
 
-    private CountCellHandler countCellHandler = new CountCellHandler();
+    private final CountCellHandler countCellHandler = new CountCellHandler();
 
     public void testNotTraverseEmptyCells() {
        Workbook wb = new HSSFWorkbook();