diff --git a/android/guava-tests/test/com/google/common/io/FileTreeTraverserTest.java b/android/guava-tests/test/com/google/common/io/FileTreeTraverserTest.java deleted file mode 100644 index 5be9b859fca6..000000000000 --- a/android/guava-tests/test/com/google/common/io/FileTreeTraverserTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2012 The Guava Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.common.io; - -import com.google.common.collect.ImmutableSet; -import java.io.File; -import java.io.IOException; -import junit.framework.TestCase; - -/** - * Tests for {@link Files#fileTreeViewer}. - * - * @author Colin Decker - */ - -public class FileTreeTraverserTest extends TestCase { - - private File dir; - - @Override - public void setUp() throws IOException { - dir = Files.createTempDir(); - } - - @Override - public void tearDown() throws IOException { - File[] files = dir.listFiles(); - if (files == null) { - return; - } - - // we aren't creating any files in subdirs - for (File file : files) { - file.delete(); - } - - dir.delete(); - } - - public void testFileTreeViewer_emptyDir() throws IOException { - assertDirChildren(); - } - - public void testFileTreeViewer_singleFile() throws IOException { - File file = newFile("test"); - assertDirChildren(file); - } - - public void testFileTreeViewer_singleDir() throws IOException { - File file = newDir("test"); - assertDirChildren(file); - } - - public void testFileTreeViewer_multipleFiles() throws IOException { - File a = newFile("a"); - File b = newDir("b"); - File c = newFile("c"); - File d = newDir("d"); - assertDirChildren(a, b, c, d); - } - - private File newDir(String name) throws IOException { - File file = new File(dir, name); - file.mkdir(); - return file; - } - - private File newFile(String name) throws IOException { - File file = new File(dir, name); - file.createNewFile(); - return file; - } - - private void assertDirChildren(File... files) { - assertEquals( - ImmutableSet.copyOf(files), ImmutableSet.copyOf(Files.fileTreeTraverser().children(dir))); - } -} diff --git a/android/guava-tests/test/com/google/common/io/FilesTest.java b/android/guava-tests/test/com/google/common/io/FilesTest.java index 64f27758639e..e987f600a146 100644 --- a/android/guava-tests/test/com/google/common/io/FilesTest.java +++ b/android/guava-tests/test/com/google/common/io/FilesTest.java @@ -43,8 +43,7 @@ /** * Unit test for {@link Files}. * - *
Note: {@link Files#fileTreeTraverser()} is tested in {@link FileTreeTraverserTest} and {@link - * Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}. + *
Note: {@link Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}.
*
* @author Chris Nokleberg
*/
diff --git a/android/guava/src/com/google/common/io/Files.java b/android/guava/src/com/google/common/io/Files.java
index c988120b9eed..6a763f96c298 100644
--- a/android/guava/src/com/google/common/io/Files.java
+++ b/android/guava/src/com/google/common/io/Files.java
@@ -802,11 +802,10 @@ public static String getNameWithoutExtension(String file) {
*
* @since 15.0
* @deprecated The returned {@link TreeTraverser} type is deprecated. Use the replacement method
- * {@link #fileTraverser()} instead with the same semantics as this method. This method is
- * scheduled to be removed in April 2018.
+ * {@link #fileTraverser()} instead with the same semantics as this method.
*/
@Deprecated
- public static TreeTraverser Note: {@link Files#fileTreeTraverser()} is tested in {@link FileTreeTraverserTest} and {@link
- * Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}.
+ * Note: {@link Files#fileTraverser()} is tested in {@link FilesFileTraverserTest}.
*
* @author Chris Nokleberg
*/
diff --git a/guava/src/com/google/common/io/Files.java b/guava/src/com/google/common/io/Files.java
index c988120b9eed..6a763f96c298 100644
--- a/guava/src/com/google/common/io/Files.java
+++ b/guava/src/com/google/common/io/Files.java
@@ -802,11 +802,10 @@ public static String getNameWithoutExtension(String file) {
*
* @since 15.0
* @deprecated The returned {@link TreeTraverser} type is deprecated. Use the replacement method
- * {@link #fileTraverser()} instead with the same semantics as this method. This method is
- * scheduled to be removed in April 2018.
+ * {@link #fileTraverser()} instead with the same semantics as this method.
*/
@Deprecated
- public static TreeTraverser Note that if the {@link Path} passed to one of the traversal methods does not exist, no
- * exception will be thrown and the returned {@link Iterable} will contain a single element: that
- * path.
- *
- * {@link DirectoryIteratorException} may be thrown when iterating {@link Iterable} instances
- * created by this traverser if an {@link IOException} is thrown by a call to {@link
- * #listFiles(Path)}.
- *
- * @deprecated The returned {@link TreeTraverser} type is deprecated. Use the replacement method
- * {@link #fileTraverser()} instead with the same semantics as this method. This method is
- * scheduled to be removed in April 2018.
- */
- @Deprecated
- public static TreeTraverser