harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r773956 - /harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
Date Tue, 12 May 2009 16:09:50 GMT
Author: odeakin
Date: Tue May 12 16:09:50 2009
New Revision: 773956

URL: http://svn.apache.org/viewvc?rev=773956&view=rev
Log:
getBytes() calls should use consistent encodings.

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java?rev=773956&r1=773955&r2=773956&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
Tue May 12 16:09:50 2009
@@ -59,9 +59,15 @@
 
     private static final byte[] TEST_BYTES;
 
+    private static final byte[] CONTENT_AS_BYTES;
+
+    private static final int CONTENT_AS_BYTES_LENGTH;
+
     static {
         try {
             TEST_BYTES = "test".getBytes("iso8859-1");
+            CONTENT_AS_BYTES = CONTENT.getBytes("iso8859-1");
+            CONTENT_AS_BYTES_LENGTH = CONTENT_AS_BYTES.length;
         } catch (UnsupportedEncodingException e) {
             throw new Error(e);
         }
@@ -69,10 +75,6 @@
 
     private static final int CONTENT_LENGTH = CONTENT.length();
 
-    private static final byte[] CONTENT_AS_BYTES = CONTENT.getBytes();
-
-    private static final int CONTENT_AS_BYTES_LENGTH = CONTENT_AS_BYTES.length;
-
     private FileChannel readOnlyFileChannel;
 
     private FileChannel writeOnlyFileChannel;



Mime
View raw message