You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by od...@apache.org on 2009/05/12 18:09:50 UTC

svn commit: r773956 - /harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java

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;