commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1642759 - in /commons/proper/io/trunk/src: main/java/org/apache/commons/io/ main/java/org/apache/commons/io/input/ test/java/org/apache/commons/io/ test/java/org/apache/commons/io/filefilter/ test/java/org/apache/commons/io/input/ test/jav...
Date Mon, 01 Dec 2014 21:14:29 GMT
Author: sebb
Date: Mon Dec  1 21:14:28 2014
New Revision: 1642759

URL: http://svn.apache.org/r1642759
Log:
Fix unavoidable deprecations

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
    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/main/java/org/apache/commons/io/FileUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java?rev=1642759&r1=1642758&r2=1642759&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java Mon Dec  1
21:14:28 2014
@@ -858,6 +858,7 @@ public class FileUtils {
      * @return The decoded URL or {@code null} if the input was
      *         {@code null}.
      */
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     static String decodeUrl(final String url) {
         String decoded = url;
         if (url != null && url.indexOf('%') >= 0) {

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java?rev=1642759&r1=1642758&r2=1642759&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
(original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java
Mon Dec  1 21:14:28 2014
@@ -92,6 +92,7 @@ public class ReversedLinesFileReader imp
      * @throws IOException  if an I/O error occurs
      * @since 2.3
      */
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public ReversedLinesFileReader(final File file, final int blockSize, final Charset encoding)
throws IOException {
         this.blockSize = blockSize;
         this.encoding = encoding;

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java?rev=1642759&r1=1642758&r2=1642759&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/CharsetsTestCase.java Mon
Dec  1 21:14:28 2014
@@ -21,7 +21,6 @@ import java.nio.charset.Charset;
 import java.util.SortedMap;
 
 import org.junit.Assert;
-
 import org.junit.Test;
 
 /**
@@ -45,6 +44,7 @@ public class CharsetsTestCase {
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testIso8859_1() {
         Assert.assertEquals("ISO-8859-1", Charsets.ISO_8859_1.name());
     }
@@ -58,26 +58,31 @@ public class CharsetsTestCase {
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testUsAscii() {
         Assert.assertEquals("US-ASCII", Charsets.US_ASCII.name());
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testUtf16() {
         Assert.assertEquals("UTF-16", Charsets.UTF_16.name());
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testUtf16Be() {
         Assert.assertEquals("UTF-16BE", Charsets.UTF_16BE.name());
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testUtf16Le() {
         Assert.assertEquals("UTF-16LE", Charsets.UTF_16LE.name());
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testUtf8() {
         Assert.assertEquals("UTF-8", Charsets.UTF_8.name());
     }

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java?rev=1642759&r1=1642758&r2=1642759&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java Mon Dec
 1 21:14:28 2014
@@ -49,6 +49,7 @@ public class DemuxTestCase {
     private final HashMap<String, ByteArrayOutputStream> m_outputMap = new HashMap<String,
ByteArrayOutputStream>();
     private final HashMap<String, Thread> m_threadMap = new HashMap<String, Thread>();
 
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     private String getOutput( final String threadName )
     {
         final ByteArrayOutputStream output =

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java?rev=1642759&r1=1642758&r2=1642759&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsTestCase.java Mon Dec
 1 21:14:28 2014
@@ -219,6 +219,7 @@ public class IOUtilsTestCase extends Fil
         }
     }
 
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testContentEquals_InputStream_InputStream() throws Exception {
         {
             final ByteArrayInputStream input1 = new ByteArrayInputStream("".getBytes(Charsets.UTF_8));

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java?rev=1642759&r1=1642758&r2=1642759&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
Mon Dec  1 21:14:28 2014
@@ -946,6 +946,7 @@ public class FileFilterTestCase extends 
 
     //-----------------------------------------------------------------------
 
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testMagicNumberFileFilterBytes() throws Exception {
         final byte[] classFileMagicNumber =
             new byte[] {(byte) 0xCA, (byte) 0xFE, (byte) 0xBA, (byte) 0xBE};
@@ -1013,6 +1014,7 @@ public class FileFilterTestCase extends 
         assertFiltering(filter, dir, false);
     }
 
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testMagicNumberFileFilterString() throws Exception {
         final byte[] classFileMagicNumber =
             new byte[] {(byte) 0xCA, (byte) 0xFE, (byte) 0xBA, (byte) 0xBE};
@@ -1045,6 +1047,7 @@ public class FileFilterTestCase extends 
         assertFiltering(filter, dir, false);
     }
 
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testMagicNumberFileFilterStringOffset() throws Exception {
         final String tarMagicNumber = "ustar";
         final long tarMagicNumberOffset = 257;

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java?rev=1642759&r1=1642758&r2=1642759&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java
Mon Dec  1 21:14:28 2014
@@ -438,6 +438,7 @@ public class BOMInputStreamTest {
 
     @Test
     public void testReadWithBOMUtf16Be() throws Exception {
+        @SuppressWarnings("deprecation") // unavoidable until Java 7
         final byte[] data = "ABC".getBytes(Charsets.UTF_16BE);
         final BOMInputStream in = new BOMInputStream(createUtf16BeDataStream(data, true),
ByteOrderMark.UTF_16BE);
         assertEquals(0, in.read());
@@ -461,6 +462,7 @@ public class BOMInputStreamTest {
 
     @Test
     public void testReadWithBOMUtf16Le() throws Exception {
+        @SuppressWarnings("deprecation") // unavoidable until Java 7
         final byte[] data = "ABC".getBytes(Charsets.UTF_16LE);
         final BOMInputStream in = new BOMInputStream(createUtf16LeDataStream(data, true),
ByteOrderMark.UTF_16LE);
         assertEquals('A', in.read());
@@ -544,6 +546,7 @@ public class BOMInputStreamTest {
 
     @Test
     public void testReadWithBOMUtf8() throws Exception {
+        @SuppressWarnings("deprecation") // unavoidable until Java 7
         final byte[] data = "ABC".getBytes(Charsets.UTF_8);
         final BOMInputStream in = new BOMInputStream(createUtf8DataStream(data, true), ByteOrderMark.UTF_8);
         assertEquals('A', in.read());
@@ -614,6 +617,7 @@ public class BOMInputStreamTest {
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testReadXmlWithBOMUtf16Be() throws Exception {
         final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-16BE\"?><X/>".getBytes(Charsets.UTF_16BE);
         parseXml(new BOMInputStream(createUtf16BeDataStream(data, true), ByteOrderMark.UTF_16BE));
@@ -621,6 +625,7 @@ public class BOMInputStreamTest {
     }
 
     @Test
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testReadXmlWithBOMUtf16Le() throws Exception {
         final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-16LE\"?><X/>".getBytes(Charsets.UTF_16LE);
         parseXml(new BOMInputStream(createUtf16LeDataStream(data, true), ByteOrderMark.UTF_16LE));
@@ -647,6 +652,7 @@ public class BOMInputStreamTest {
 
     @Test
     public void testReadXmlWithBOMUtf8() throws Exception {
+        @SuppressWarnings("deprecation") // unavoidable until Java 7
         final byte[] data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><X/>".getBytes(Charsets.UTF_8);
         parseXml(new BOMInputStream(createUtf8DataStream(data, true)));
         parseXml(createUtf8DataStream(data, true));

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=1642759&r1=1642758&r2=1642759&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 Mon
Dec  1 21:14:28 2014
@@ -112,6 +112,7 @@ public class TailerTest extends FileBase
         listener.clear();
     }
 
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testMultiByteBreak() throws Exception {
         System.out.println("testMultiByteBreak() Default charset: "+Charset.defaultCharset().displayName());
         final long delay = 50;

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=1642759&r1=1642758&r2=1642759&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
Mon Dec  1 21:14:28 2014
@@ -104,6 +104,7 @@ public class LockableFileWriterTest exte
     }
 
     //-----------------------------------------------------------------------
+    @SuppressWarnings("deprecation") // unavoidable until Java 7
     public void testAlternateLockDir() throws IOException {
         LockableFileWriter lfw1 = null;
         LockableFileWriter lfw2 = null;



Mime
View raw message