]> source.dussan.org Git - poi.git/commitdiff
github-77: Remove the 'public' modifier to make fields package protected (findbugs...
authorJaven O'Neal <onealj@apache.org>
Tue, 31 Oct 2017 09:38:03 +0000 (09:38 +0000)
committerJaven O'Neal <onealj@apache.org>
Tue, 31 Oct 2017 09:38:03 +0000 (09:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813859 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java

index ad38755a0facdddf5ccfe00a7e8bfaab9ea94ba0..b9f4cc4ee6a97c382fdf6aa2eb030a77b726f8e7 100644 (file)
@@ -33,9 +33,11 @@ import org.apache.poi.util.LittleEndian;
  *  handles decompressing it for you.
  */
 public final class CompressedRTF extends LZWDecompresser {
-   public static final byte[] COMPRESSED_SIGNATURE =
+   // github-77: mutable static fields could be changed by malicious code or by accident.
+   // These byte arrays should be package protected.
+   /*package*/ static final byte[] COMPRESSED_SIGNATURE =
       new byte[] { (byte)'L', (byte)'Z', (byte)'F', (byte)'u' };
-   public static final byte[] UNCOMPRESSED_SIGNATURE =
+   /*package*/ static final byte[] UNCOMPRESSED_SIGNATURE =
       new byte[] { (byte)'M', (byte)'E', (byte)'L', (byte)'A' };
    public static final int COMPRESSED_SIGNATURE_INT =
       LittleEndian.getInt(COMPRESSED_SIGNATURE);