commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1032189 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
Date Sun, 07 Nov 2010 00:26:26 GMT
Author: niallp
Date: Sun Nov  7 00:26:25 2010
New Revision: 1032189

URL: http://svn.apache.org/viewvc?rev=1032189&view=rev
Log:
Fix OutOfMemoryError when running test using Apache Harmony 6.0M3

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java?rev=1032189&r1=1032188&r2=1032189&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
Sun Nov  7 00:26:25 2010
@@ -101,8 +101,7 @@ public class FileWriterWithEncodingTest 
     }
 
     public void testDifferentEncoding() throws Exception {
-        Map<String, Charset> map = Charset.availableCharsets();
-        if (map.containsKey("UTF-16BE")) {
+        if (Charset.isSupported("UTF-16BE")) {
             FileWriter fw1 = null;
             FileWriterWithEncoding fw2 = null;
             try {
@@ -130,7 +129,7 @@ public class FileWriterWithEncodingTest 
             assertEquals(true, file1.exists());
             assertEquals(true, file2.exists());
         }
-        if (map.containsKey("UTF-16LE")) {
+        if (Charset.isSupported("UTF-16LE")) {
             FileWriter fw1 = null;
             FileWriterWithEncoding fw2 = null;
             try {



Mime
View raw message