commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1470205 - in /commons/proper/io/trunk/src/test/java/org/apache/commons/io: input/TailerTest.java output/LockableFileWriterTest.java
Date Sat, 20 Apr 2013 17:56:19 GMT
Author: sebb
Date: Sat Apr 20 17:56:18 2013
New Revision: 1470205

URL: http://svn.apache.org/r1470205
Log:
Fix deprecation warnings

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java?rev=1470205&r1=1470204&r2=1470205&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java Sat
Apr 20 17:56:18 2013
@@ -210,7 +210,7 @@ public class TailerTest extends FileBase
         listener.clear();
 
         // Check file does actually have all the lines
-        lines = FileUtils.readLines(file);
+        lines = FileUtils.readLines(file, "UTF-8");
         assertEquals("3 line count", 3, lines.size());
         assertEquals("3 line 1", "Line one", lines.get(0));
         assertEquals("3 line 2", "Line two", lines.get(1));

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java?rev=1470205&r1=1470204&r2=1470205&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
Sat Apr 20 17:56:18 2013
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.io.Writer;
 import java.nio.charset.UnsupportedCharsetException;
 
+import org.apache.commons.io.Charsets;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
@@ -108,13 +109,13 @@ public class LockableFileWriterTest exte
         LockableFileWriter lfw2 = null;
         try {
             // open a valid locakable writer
-            lfw1 = new LockableFileWriter(file, true, altLockDir.getAbsolutePath());
+            lfw1 = new LockableFileWriter(file, "UTF-8" ,true, altLockDir.getAbsolutePath());
             assertTrue(file.exists());
             assertTrue(altLockFile.exists());
             
             // try to open a second writer
             try {
-                lfw2 = new LockableFileWriter(file, true, altLockDir.getAbsolutePath());
+                lfw2 = new LockableFileWriter(file, Charsets.UTF_8, true, altLockDir.getAbsolutePath());
                 fail("Somehow able to open a locked file. ");
             } catch(final IOException ioe) {
                 final String msg = ioe.getMessage();



Mime
View raw message