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.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1813859 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2017-10-31 09:38:03 +00:00
parent b4ee3da44f
commit b3cb1211a4
1 changed files with 4 additions and 2 deletions

View 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);