Skip to content

Commit a2b9dfb

Browse files
committed
Add missing '@OverRide' annotations
Add missing '@OverRide' annotations to implementations of interface methods git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1635504 13f79535-47bb-0310-9956-ffa450edef68
1 parent a7c3ae2 commit a2b9dfb

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/main/java/org/apache/commons/csv/CSVParser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ private void addRecordValue() {
302302
* @throws IOException
303303
* If an I/O error occurs
304304
*/
305+
@Override
305306
public void close() throws IOException {
306307
if (this.lexer != null) {
307308
this.lexer.close();
@@ -424,6 +425,7 @@ public boolean isClosed() {
424425
* If the parser is closed a call to {@code next()} will throw a
425426
* NoSuchElementException.</p>
426427
*/
428+
@Override
427429
public Iterator<CSVRecord> iterator() {
428430
return new Iterator<CSVRecord>() {
429431
private CSVRecord current;
@@ -437,6 +439,7 @@ private CSVRecord getNextRecord() {
437439
}
438440
}
439441

442+
@Override
440443
public boolean hasNext() {
441444
if (CSVParser.this.isClosed()) {
442445
return false;
@@ -448,6 +451,7 @@ public boolean hasNext() {
448451
return this.current != null;
449452
}
450453

454+
@Override
451455
public CSVRecord next() {
452456
if (CSVParser.this.isClosed()) {
453457
throw new NoSuchElementException("CSVParser has been closed");
@@ -466,6 +470,7 @@ public CSVRecord next() {
466470
return next;
467471
}
468472

473+
@Override
469474
public void remove() {
470475
throw new UnsupportedOperationException();
471476
}

src/main/java/org/apache/commons/csv/CSVPrinter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public CSVPrinter(final Appendable out, final CSVFormat format) throws IOExcepti
8383
// printing implementation
8484
// ======================================================
8585

86+
@Override
8687
public void close() throws IOException {
8788
if (out instanceof Closeable) {
8889
((Closeable) out).close();
@@ -95,6 +96,7 @@ public void close() throws IOException {
9596
* @throws IOException
9697
* If an I/O error occurs
9798
*/
99+
@Override
98100
public void flush() throws IOException {
99101
if (out instanceof Flushable) {
100102
((Flushable) out).flush();

src/test/java/org/apache/commons/csv/TokenMatchers.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ final class TokenMatchers {
3030
public static Matcher<Token> hasType(final Token.Type expectedType) {
3131
return new TypeSafeDiagnosingMatcher<Token>() {
3232

33+
@Override
3334
public void describeTo(final Description description) {
3435
description.appendText("token has type ");
3536
description.appendValue(expectedType);
@@ -48,6 +49,7 @@ protected boolean matchesSafely(final Token item,
4849
public static Matcher<Token> hasContent(final String expectedContent) {
4950
return new TypeSafeDiagnosingMatcher<Token>() {
5051

52+
@Override
5153
public void describeTo(final Description description) {
5254
description.appendText("token has content ");
5355
description.appendValue(expectedContent);
@@ -66,6 +68,7 @@ protected boolean matchesSafely(final Token item,
6668
public static Matcher<Token> isReady() {
6769
return new TypeSafeDiagnosingMatcher<Token>() {
6870

71+
@Override
6972
public void describeTo(final Description description) {
7073
description.appendText("token is ready ");
7174
}

0 commit comments

Comments
 (0)