Skip to content

Commit 2a915f5

Browse files
committed
Add missing '@OverRide' annotations.
1 parent 933796e commit 2a915f5

30 files changed

Lines changed: 80 additions & 0 deletions

src/main/java/org/apache/commons/io/LineIterator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public LineIterator(final Reader reader) throws IllegalArgumentException {
8484
* @return {@code true} if the Reader has more lines
8585
* @throws IllegalStateException if an IO exception occurs
8686
*/
87+
@Override
8788
public boolean hasNext() {
8889
if (cachedLine != null) {
8990
return true;
@@ -128,6 +129,7 @@ protected boolean isValidLine(final String line) {
128129
* @return the next line from the input
129130
* @throws NoSuchElementException if there is no line to return
130131
*/
132+
@Override
131133
public String next() {
132134
return nextLine();
133135
}
@@ -170,6 +172,7 @@ public void close() throws IOException {
170172
*
171173
* @throws UnsupportedOperationException always
172174
*/
175+
@Override
173176
public void remove() {
174177
throw new UnsupportedOperationException("Remove unsupported on LineIterator");
175178
}

src/main/java/org/apache/commons/io/ThreadMonitor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ private ThreadMonitor(final Thread thread, final long timeout) {
102102
*
103103
* @see Runnable#run()
104104
*/
105+
@Override
105106
public void run() {
106107
try {
107108
sleep(timeout);

src/main/java/org/apache/commons/io/comparator/CompositeFileComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public CompositeFileComparator(final Iterable<Comparator<File>> delegates) {
8888
* @return the first non-zero result returned from
8989
* the delegate comparators or zero.
9090
*/
91+
@Override
9192
public int compare(final File file1, final File file2) {
9293
int result = 0;
9394
for (final Comparator<File> delegate : delegates) {

src/main/java/org/apache/commons/io/comparator/DefaultFileComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class DefaultFileComparator extends AbstractFileComparator implements Ser
6161
* @return the result of calling file1's
6262
* {@link File#compareTo(File)} with file2 as the parameter.
6363
*/
64+
@Override
6465
public int compare(final File file1, final File file2) {
6566
return file1.compareTo(file2);
6667
}

src/main/java/org/apache/commons/io/comparator/DirectoryFileComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public class DirectoryFileComparator extends AbstractFileComparator implements S
6060
* @return the result of calling file1's
6161
* {@link File#compareTo(File)} with file2 as the parameter.
6262
*/
63+
@Override
6364
public int compare(final File file1, final File file2) {
6465
return getType(file1) - getType(file2);
6566
}

src/main/java/org/apache/commons/io/comparator/ExtensionFileComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public ExtensionFileComparator(final IOCase caseSensitivity) {
104104
* is greater than the second file.
105105
*
106106
*/
107+
@Override
107108
public int compare(final File file1, final File file2) {
108109
final String suffix1 = FilenameUtils.getExtension(file1.getName());
109110
final String suffix2 = FilenameUtils.getExtension(file2.getName());

src/main/java/org/apache/commons/io/comparator/LastModifiedFileComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public class LastModifiedFileComparator extends AbstractFileComparator implement
6565
* is greater than the second file.
6666
*
6767
*/
68+
@Override
6869
public int compare(final File file1, final File file2) {
6970
final long result = file1.lastModified() - file2.lastModified();
7071
if (result < 0) {

src/main/java/org/apache/commons/io/comparator/NameFileComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public NameFileComparator(final IOCase caseSensitivity) {
9999
* same and a positive value if the first files name
100100
* is greater than the second file.
101101
*/
102+
@Override
102103
public int compare(final File file1, final File file2) {
103104
return caseSensitivity.checkCompareTo(file1.getName(), file2.getName());
104105
}

src/main/java/org/apache/commons/io/comparator/PathFileComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public PathFileComparator(final IOCase caseSensitivity) {
100100
* is greater than the second file.
101101
*
102102
*/
103+
@Override
103104
public int compare(final File file1, final File file2) {
104105
return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath());
105106
}

src/main/java/org/apache/commons/io/comparator/ReverseComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public ReverseComparator(final Comparator<File> delegate) {
5151
* @return the result from the delegate {@link Comparator#compare(Object, Object)}
5252
* reversing the value (i.e. positive becomes negative and vice versa)
5353
*/
54+
@Override
5455
public int compare(final File file1, final File file2) {
5556
return delegate.compare(file2, file1); // parameters switched round
5657
}

0 commit comments

Comments
 (0)