You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/01/08 14:02:03 UTC
svn commit: r897193 -
/commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java
Author: sebb
Date: Fri Jan 8 13:02:03 2010
New Revision: 897193
URL: http://svn.apache.org/viewvc?rev=897193&view=rev
Log:
Remove items from try block that don't need to be protected; fixes possible NPE warning in Eclipse.
Start fixing raw types
Modified:
commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java
Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java?rev=897193&r1=897192&r2=897193&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java Fri Jan 8 13:02:03 2010
@@ -326,12 +326,10 @@
* Test Cancel
*/
public void testMultiThreadCancel() {
- String cancelName = null;
- TestMultiThreadCancelWalker walker = null;
+ String cancelName = "DirectoryWalker.java";
+ TestMultiThreadCancelWalker walker = new TestMultiThreadCancelWalker(cancelName, false);
// Cancel on a file
try {
- cancelName = "DirectoryWalker.java";
- walker = new TestMultiThreadCancelWalker(cancelName, false);
walker.find(javaDir);
fail("CancelException not thrown for '" + cancelName + "'");
} catch (DirectoryWalker.CancelException cancel) {
@@ -421,7 +419,7 @@
/** Always returns false. */
@Override
- protected boolean handleDirectory(File directory, int depth, Collection results) {
+ protected boolean handleDirectory(File directory, int depth, Collection<?> results) {
return false;
}
}
@@ -469,7 +467,7 @@
/** Handles Cancel. */
@Override
- protected void handleCancelled(File startDirectory, Collection results,
+ protected void handleCancelled(File startDirectory, Collection<?> results,
CancelException cancel) throws IOException {
if (!suppressCancel) {
super.handleCancelled(startDirectory, results, cancel);
@@ -522,13 +520,13 @@
/** Handles Cancelled. */
@Override
- protected boolean handleIsCancelled(File file, int depth, Collection results) throws IOException {
+ protected boolean handleIsCancelled(File file, int depth, Collection<?> results) throws IOException {
return cancelled;
}
/** Handles Cancel. */
@Override
- protected void handleCancelled(File startDirectory, Collection results,
+ protected void handleCancelled(File startDirectory, Collection<?> results,
CancelException cancel) throws IOException {
if (!suppressCancel) {
super.handleCancelled(startDirectory, results, cancel);