Skip to content

Commit

Permalink
Camel-case internal names
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 19, 2023
1 parent 7d92032 commit 3244c54
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class DelegateFileFilter extends AbstractFileFilter implements Serializab
/** The File filter */
private final FileFilter fileFilter;
/** The Filename filter */
private final FilenameFilter filenameFilter;
private final FilenameFilter fileNameFilter;

/**
* Constructs a delegate file filter around an existing FileFilter.
Expand All @@ -49,7 +49,7 @@ public class DelegateFileFilter extends AbstractFileFilter implements Serializab
public DelegateFileFilter(final FileFilter fileFilter) {
Objects.requireNonNull(fileFilter, "filter");
this.fileFilter = fileFilter;
this.filenameFilter = null;
this.fileNameFilter = null;
}

/**
Expand All @@ -59,7 +59,7 @@ public DelegateFileFilter(final FileFilter fileFilter) {
*/
public DelegateFileFilter(final FilenameFilter filenameFilter) {
Objects.requireNonNull(filenameFilter, "filter");
this.filenameFilter = filenameFilter;
this.fileNameFilter = filenameFilter;
this.fileFilter = null;
}

Expand All @@ -86,8 +86,8 @@ public boolean accept(final File file) {
*/
@Override
public boolean accept(final File dir, final String name) {
if (filenameFilter != null) {
return filenameFilter.accept(dir, name);
if (fileNameFilter != null) {
return fileNameFilter.accept(dir, name);
}
return super.accept(dir, name);
}
Expand All @@ -99,7 +99,7 @@ public boolean accept(final File dir, final String name) {
*/
@Override
public String toString() {
final String delegate = fileFilter != null ? fileFilter.toString() : filenameFilter.toString();
final String delegate = fileFilter != null ? fileFilter.toString() : fileNameFilter.toString();
return super.toString() + "(" + delegate + ")";
}

Expand Down

0 comments on commit 3244c54

Please sign in to comment.