Skip to content

Commit

Permalink
refactor: make RecordStream constructor private
Browse files Browse the repository at this point in the history
This constructor is never accessed outside of this class. Other classes all use RecordStream.of().
  • Loading branch information
remcowesterhoud committed Feb 22, 2022
1 parent 3cc895b commit e388110
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void waitForIdleState(
public void getRecords(
final GetRecordsRequest request, final StreamObserver<RecordResponse> responseObserver) {
final ObjectMapper mapper = new ObjectMapper();
final Iterable<Record<?>> records = engine.getRecordStream().records();
final Iterable<Record<?>> records = engine.getRecordStreamSource().records();
for (final Record<?> record : records) {
try {
final String recordJson = mapper.writeValueAsString(record);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class RecordStream {

private RecordStreamSource recordStreamSource;

public RecordStream(final RecordStreamSource recordStreamSource) {
private RecordStream(final RecordStreamSource recordStreamSource) {
this.recordStreamSource = recordStreamSource;
}

Expand Down

0 comments on commit e388110

Please sign in to comment.