diff options
author | Dominik Stadler <centic@apache.org> | 2019-12-14 13:10:12 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2019-12-14 13:10:12 +0000 |
commit | 57b0576f63fffcbc55afc58e3e9d186d2d8c4e72 (patch) | |
tree | 526b31670569a1071223c717a81b2f56e500ea11 /src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java | |
parent | 4c034f0e202ab6c3a56a2c30716d2c56f9be3311 (diff) | |
download | poi-57b0576f63fffcbc55afc58e3e9d186d2d8c4e72.tar.gz poi-57b0576f63fffcbc55afc58e3e9d186d2d8c4e72.zip |
Adjust some JavaDoc and fix some IDE warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1871505 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java')
-rw-r--r-- | src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java b/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java index d8781c22c1..959079a758 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertTrue; import java.io.ByteArrayInputStream; import java.io.InputStream; +import java.nio.charset.StandardCharsets; import org.apache.poi.POIDataSamples; import org.apache.poi.hmef.attribute.MAPIAttribute; @@ -118,7 +119,7 @@ public final class TestCompressedRTF { // Decompress it CompressedRTF comp = new CompressedRTF(); byte[] decomp = comp.decompress(new ByteArrayInputStream(data)); - String decompStr = new String(decomp, "ASCII"); + String decompStr = new String(decomp, StandardCharsets.US_ASCII); // Test assertEquals(block1.length(), decomp.length); @@ -147,7 +148,7 @@ public final class TestCompressedRTF { // Decompress it CompressedRTF comp = new CompressedRTF(); byte[] decomp = comp.decompress(new ByteArrayInputStream(data)); - String decompStr = new String(decomp, "ASCII"); + String decompStr = new String(decomp, StandardCharsets.US_ASCII); // Test assertEquals(block2.length(), decomp.length); @@ -195,7 +196,7 @@ public final class TestCompressedRTF { } // By String - String expString = new String(expected, "ASCII"); + String expString = new String(expected, StandardCharsets.US_ASCII); String decompStr = rtfAttr.getDataString(); assertEquals(expString.length(), decompStr.length()); assertEquals(expString, decompStr); |