commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1534222 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
Date Mon, 21 Oct 2013 15:34:58 GMT
Author: ggregory
Date: Mon Oct 21 15:34:58 2013
New Revision: 1534222

URL: http://svn.apache.org/r1534222
Log:
Better ivar and param name (charsetName instead of charset).

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java?rev=1534222&r1=1534221&r2=1534222&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FallbackZipEncoding.java
Mon Oct 21 15:34:58 2013
@@ -41,24 +41,24 @@ import java.nio.ByteBuffer;
  * @Immutable
  */
 class FallbackZipEncoding implements ZipEncoding {
-    private final String charset;
+    private final String charsetName;
 
     /**
      * Construct a fallback zip encoding, which uses the platform's
      * default charset.
      */
     public FallbackZipEncoding() {
-        this.charset = null;
+        this.charsetName = null;
     }
 
     /**
      * Construct a fallback zip encoding, which uses the given charset.
      * 
-     * @param charset The name of the charset or {@code null} for
+     * @param charsetName The name of the charset or {@code null} for
      *                the platform's default character set.
      */
-    public FallbackZipEncoding(String charset) {
-        this.charset = charset;
+    public FallbackZipEncoding(String charsetName) {
+        this.charsetName = charsetName;
     }
 
     /**
@@ -74,10 +74,10 @@ class FallbackZipEncoding implements Zip
      * org.apache.commons.compress.archivers.zip.ZipEncoding#encode(java.lang.String)
      */
     public ByteBuffer encode(String name) throws IOException {
-        if (this.charset == null) { // i.e. use default charset, see no-args constructor
+        if (this.charsetName == null) { // i.e. use default charset, see no-args constructor
             return ByteBuffer.wrap(name.getBytes());
         } else {
-            return ByteBuffer.wrap(name.getBytes(this.charset));
+            return ByteBuffer.wrap(name.getBytes(this.charsetName));
         }
     }
 
@@ -86,10 +86,10 @@ class FallbackZipEncoding implements Zip
      * org.apache.commons.compress.archivers.zip.ZipEncoding#decode(byte[])
      */
     public String decode(byte[] data) throws IOException {
-        if (this.charset == null) { // i.e. use default charset, see no-args constructor
+        if (this.charsetName == null) { // i.e. use default charset, see no-args constructor
             return new String(data);
         } else {
-            return new String(data,this.charset);
+            return new String(data,this.charsetName);
         }
     }
 }



Mime
View raw message