You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2015/02/20 17:44:36 UTC
svn commit: r1661157 - in /commons/proper/compress/trunk/src:
changes/changes.xml
main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java
Author: bodewig
Date: Fri Feb 20 16:44:36 2015
New Revision: 1661157
URL: http://svn.apache.org/r1661157
Log:
don't read system properties for default charset - COMPRESS-308
Modified:
commons/proper/compress/trunk/src/changes/changes.xml
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java
Modified: commons/proper/compress/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1661157&r1=1661156&r2=1661157&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Fri Feb 20 16:44:36 2015
@@ -54,8 +54,11 @@ breaks backwards compatibility for code
This also changes the superclass of ZCompressorInputStream.
">
- <action issue="COMPRESS-309" type="fix"
- date="2015-02-20">
+ <action issue="COMPRESS-308" type="fix" date="2015-02-20">
+ ZipEncodingHelper no longer reads system properties directly
+ to determine the default charset.
+ </action>
+ <action issue="COMPRESS-309" type="fix" date="2015-02-20">
BZip2CompressorInputStream#read would return -1 when asked to
read 0 bytes.
</action>
Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java?rev=1661157&r1=1661156&r2=1661157&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java Fri Feb 20 16:44:36 2015
@@ -243,7 +243,7 @@ public abstract class ZipEncodingHelper
static boolean isUTF8(String charsetName) {
if (charsetName == null) {
// check platform's default encoding
- charsetName = System.getProperty("file.encoding");
+ charsetName = Charset.defaultCharset().name();
}
if (Charsets.UTF_8.name().equalsIgnoreCase(charsetName)) {
return true;