Skip to content

Commit 4bd013e

Browse files
committed
add comment on constructor handling the writer and close
1 parent eff8e17 commit 4bd013e

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

jablib/src/main/java/org/jabref/logic/integrity/IntegrityCheckResultErrorFormatWriter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,4 @@ public void writeFindings() throws IOException {
3434
message.message()));
3535
}
3636
}
37-
38-
@Override
39-
public void close() throws IOException {
40-
}
4137
}

jablib/src/main/java/org/jabref/logic/integrity/IntegrityCheckResultTxtWriter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,4 @@ public void writeFindings() throws IOException {
1717
writer.write(System.lineSeparator());
1818
}
1919
}
20-
21-
@Override
22-
public void close() throws IOException {
23-
}
2420
}

jablib/src/main/java/org/jabref/logic/integrity/IntegrityCheckResultWriter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ public abstract class IntegrityCheckResultWriter implements Closeable {
1010
protected final List<IntegrityMessage> messages;
1111
protected final Writer writer;
1212

13+
/// Writer lifecycle: The caller is responsible for closing the writer at the appropriate time.
1314
public IntegrityCheckResultWriter(Writer writer, List<IntegrityMessage> messages) {
1415
this.writer = writer;
1516
this.messages = messages;
1617
}
1718

1819
public abstract void writeFindings() throws IOException;
20+
21+
@Override
22+
public void close() throws IOException { }
1923
}

0 commit comments

Comments
 (0)