Skip to content

Commit 2e12579

Browse files
committed
Use generics.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@620379 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6de38ce commit 2e12579

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/java/org/apache/commons/io/DirectoryWalker.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ protected DirectoryWalker(IOFileFilter directoryFilter, IOFileFilter fileFilter,
326326
* @throws NullPointerException if the start directory is null
327327
* @throws IOException if an I/O Error occurs
328328
*/
329-
protected final void walk(File startDirectory, Collection results) throws IOException {
329+
protected final void walk(File startDirectory, Collection<?> results) throws IOException {
330330
if (startDirectory == null) {
331331
throw new NullPointerException("Start Directory is null");
332332
}
@@ -347,7 +347,7 @@ protected final void walk(File startDirectory, Collection results) throws IOExce
347347
* @param results the collection of result objects, may be updated
348348
* @throws IOException if an I/O Error occurs
349349
*/
350-
private void walk(File directory, int depth, Collection results) throws IOException {
350+
private void walk(File directory, int depth, Collection<?> results) throws IOException {
351351
checkIfCancelled(directory, depth, results);
352352
if (handleDirectory(directory, depth, results)) {
353353
handleDirectoryStart(directory, depth, results);
@@ -390,7 +390,7 @@ private void walk(File directory, int depth, Collection results) throws IOExcept
390390
* @param results the collection of result objects, may be updated
391391
* @throws IOException if an I/O Error occurs
392392
*/
393-
protected final void checkIfCancelled(File file, int depth, Collection results) throws IOException {
393+
protected final void checkIfCancelled(File file, int depth, Collection<?> results) throws IOException {
394394
if (handleIsCancelled(file, depth, results)) {
395395
throw new CancelException(file, depth);
396396
}
@@ -432,7 +432,7 @@ protected final void checkIfCancelled(File file, int depth, Collection results)
432432
* @throws IOException if an I/O Error occurs
433433
*/
434434
protected boolean handleIsCancelled(
435-
File file, int depth, Collection results) throws IOException {
435+
File file, int depth, Collection<?> results) throws IOException {
436436
// do nothing - overridable by subclass
437437
return false; // not cancelled
438438
}
@@ -450,7 +450,7 @@ protected boolean handleIsCancelled(
450450
* containing details at the point of cancellation.
451451
* @throws IOException if an I/O Error occurs
452452
*/
453-
protected void handleCancelled(File startDirectory, Collection results,
453+
protected void handleCancelled(File startDirectory, Collection<?> results,
454454
CancelException cancel) throws IOException {
455455
// re-throw exception - overridable by subclass
456456
throw cancel;
@@ -466,7 +466,7 @@ protected void handleCancelled(File startDirectory, Collection results,
466466
* @param results the collection of result objects, may be updated
467467
* @throws IOException if an I/O Error occurs
468468
*/
469-
protected void handleStart(File startDirectory, Collection results) throws IOException {
469+
protected void handleStart(File startDirectory, Collection<?> results) throws IOException {
470470
// do nothing - overridable by subclass
471471
}
472472

@@ -485,7 +485,7 @@ protected void handleStart(File startDirectory, Collection results) throws IOExc
485485
* @return true to process this directory, false to skip this directory
486486
* @throws IOException if an I/O Error occurs
487487
*/
488-
protected boolean handleDirectory(File directory, int depth, Collection results) throws IOException {
488+
protected boolean handleDirectory(File directory, int depth, Collection<?> results) throws IOException {
489489
// do nothing - overridable by subclass
490490
return true; // process directory
491491
}
@@ -500,7 +500,7 @@ protected boolean handleDirectory(File directory, int depth, Collection results)
500500
* @param results the collection of result objects, may be updated
501501
* @throws IOException if an I/O Error occurs
502502
*/
503-
protected void handleDirectoryStart(File directory, int depth, Collection results) throws IOException {
503+
protected void handleDirectoryStart(File directory, int depth, Collection<?> results) throws IOException {
504504
// do nothing - overridable by subclass
505505
}
506506

@@ -514,7 +514,7 @@ protected void handleDirectoryStart(File directory, int depth, Collection result
514514
* @param results the collection of result objects, may be updated
515515
* @throws IOException if an I/O Error occurs
516516
*/
517-
protected void handleFile(File file, int depth, Collection results) throws IOException {
517+
protected void handleFile(File file, int depth, Collection<?> results) throws IOException {
518518
// do nothing - overridable by subclass
519519
}
520520

@@ -528,7 +528,7 @@ protected void handleFile(File file, int depth, Collection results) throws IOExc
528528
* @param results the collection of result objects, may be updated
529529
* @throws IOException if an I/O Error occurs
530530
*/
531-
protected void handleRestricted(File directory, int depth, Collection results) throws IOException {
531+
protected void handleRestricted(File directory, int depth, Collection<?> results) throws IOException {
532532
// do nothing - overridable by subclass
533533
}
534534

@@ -542,7 +542,7 @@ protected void handleRestricted(File directory, int depth, Collection results) t
542542
* @param results the collection of result objects, may be updated
543543
* @throws IOException if an I/O Error occurs
544544
*/
545-
protected void handleDirectoryEnd(File directory, int depth, Collection results) throws IOException {
545+
protected void handleDirectoryEnd(File directory, int depth, Collection<?> results) throws IOException {
546546
// do nothing - overridable by subclass
547547
}
548548

@@ -554,7 +554,7 @@ protected void handleDirectoryEnd(File directory, int depth, Collection results)
554554
* @param results the collection of result objects, may be updated
555555
* @throws IOException if an I/O Error occurs
556556
*/
557-
protected void handleEnd(Collection results) throws IOException {
557+
protected void handleEnd(Collection<?> results) throws IOException {
558558
// do nothing - overridable by subclass
559559
}
560560

0 commit comments

Comments
 (0)