]> source.dussan.org Git - poi.git/commitdiff
FindBugs fixes - MS_SHOULD_BE_FINAL
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 3 Aug 2015 23:36:28 +0000 (23:36 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 3 Aug 2015 23:36:28 +0000 (23:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1693984 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java
src/java/org/apache/poi/sl/draw/DrawFactory.java
src/ooxml/java/org/apache/poi/xssf/util/NumericRanges.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFNotes.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java

index 3aafb90cac1c76a114204179e1430d748e62e2c0..6f8c04fd3b6e585c14d709ecaf8b54684fa3dca9 100644 (file)
@@ -48,25 +48,25 @@ public class EncryptionInfo {
      * A flag that specifies whether CryptoAPI RC4 or ECMA-376 encryption
      * ECMA-376 is used. It MUST be 1 unless flagExternal is 1. If flagExternal is 1, it MUST be 0.
      */
-    public static BitField flagCryptoAPI = BitFieldFactory.getInstance(0x04);
+    public static final BitField flagCryptoAPI = BitFieldFactory.getInstance(0x04);
 
     /**
      * A value that MUST be 0 if document properties are encrypted.
      * The encryption of document properties is specified in section 2.3.5.4.
      */
-    public static BitField flagDocProps = BitFieldFactory.getInstance(0x08);
+    public static final BitField flagDocProps = BitFieldFactory.getInstance(0x08);
     
     /**
      * A value that MUST be 1 if extensible encryption is used. If this value is 1,
      * the value of every other field in this structure MUST be 0.
      */
-    public static BitField flagExternal = BitFieldFactory.getInstance(0x10);
+    public static final BitField flagExternal = BitFieldFactory.getInstance(0x10);
     
     /**
      * A value that MUST be 1 if the protected content is an ECMA-376 document
      * ECMA-376. If the fAES bit is 1, the fCryptoAPI bit MUST also be 1.
      */
-    public static BitField flagAES = BitFieldFactory.getInstance(0x20);
+    public static final BitField flagAES = BitFieldFactory.getInstance(0x20);
     
     
     /**
index 9d2f05ca4fdeffbc2cb609719e5450b511ff3eed..8e75514e4d7ca43795c60d1bf9d641cc5f047829 100644 (file)
@@ -42,7 +42,7 @@ import org.apache.poi.sl.usermodel.TextRun;
 import org.apache.poi.sl.usermodel.TextShape;\r
 \r
 public class DrawFactory {\r
-    protected static ThreadLocal<DrawFactory> defaultFactory = new ThreadLocal<DrawFactory>();\r
+    protected static final ThreadLocal<DrawFactory> defaultFactory = new ThreadLocal<DrawFactory>();\r
 \r
     /**\r
      * Set a custom draw factory for the current thread.\r
index 516b535649c5770bf609ca52f7add0657b8c5558..442e24a48a79e941a66f1428a79b9627621a4ad7 100644 (file)
@@ -19,11 +19,11 @@ package org.apache.poi.xssf.util;
 
 public class NumericRanges {
 
-    public static int NO_OVERLAPS = -1;
-    public static int OVERLAPS_1_MINOR = 0;
-    public static int OVERLAPS_2_MINOR = 1;
-    public static int OVERLAPS_1_WRAPS = 2;
-    public static int OVERLAPS_2_WRAPS = 3;
+    public static final int NO_OVERLAPS = -1;
+    public static final int OVERLAPS_1_MINOR = 0;
+    public static final int OVERLAPS_2_MINOR = 1;
+    public static final int OVERLAPS_1_WRAPS = 2;
+    public static final int OVERLAPS_2_WRAPS = 3;
     
     public static long[] getOverlappingRange(long[] range1, long[] range2) {
         int overlappingType = getOverlappingType(range1, range2);
index 7f47eafe22d30d88faf571f6135735e1ca0b639f..34cb8cf2c3b854ec2815481bc801790ab9fd06e1 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.poi.util.POILogger;
  */
 
 public final class HSLFNotes extends HSLFSheet implements Notes<HSLFShape, HSLFSlideShow> {
-    protected static POILogger logger = POILogFactory.getLogger(HSLFNotes.class);
+    protected static final POILogger logger = POILogFactory.getLogger(HSLFNotes.class);
     
     private List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<List<HSLFTextParagraph>>();
 
index b07a8f8b67c7924a1511c4d1b081d5337618b5ef..0dc8de65f4024341f2e140dad82d50f8416c952e 100644 (file)
@@ -40,7 +40,7 @@ import org.apache.poi.util.*;
  */\r
 \r
 public final class HSLFTextParagraph implements TextParagraph<HSLFTextRun> {\r
-    protected static POILogger logger = POILogFactory.getLogger(HSLFTextParagraph.class);\r
+    protected static final POILogger logger = POILogFactory.getLogger(HSLFTextParagraph.class);\r
 \r
     /**\r
      * How to align the text\r