You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2017/10/31 09:38:03 UTC

svn commit: r1813859 - /poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java

Author: onealj
Date: Tue Oct 31 09:38:03 2017
New Revision: 1813859

URL: http://svn.apache.org/viewvc?rev=1813859&view=rev
Log:
github-77: Remove the 'public' modifier to make fields package protected (findbugs-MS_PKGPROTECT). Thanks to BruceKuiLiu for the PR. This closes #77 on github.

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java?rev=1813859&r1=1813858&r2=1813859&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java Tue Oct 31 09:38:03 2017
@@ -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);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org