Skip to content

Commit 4cc9f2f

Browse files
author
qqeasonchen
committed
fix(checkstyle): eventmesh-connector-file EmptyLineSeparator + NeedBraces
1 parent d782543 commit 4cc9f2f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

eventmesh-connector-plugin/eventmesh-connector-file/src/main/java/org/apache/eventmesh/connector/file/sink/FileSinkConnector.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
public class FileSinkConnector implements SinkConnector {
3232

3333
private java.io.PrintStream out;
34+
3435
@Override
3536
public void init(Properties props) {
3637
try {
@@ -39,6 +40,7 @@ public void init(Properties props) {
3940
throw new RuntimeException(e);
4041
}
4142
}
43+
4244
@Override
4345
public void put(List<CloudEvent> events) {
4446
for (CloudEvent event : events) {
@@ -47,6 +49,7 @@ public void put(List<CloudEvent> events) {
4749
}
4850
out.flush();
4951
}
52+
5053
@Override
5154
public void commit(List<CloudEvent> written) {
5255

eventmesh-connector-plugin/eventmesh-connector-file/src/main/java/org/apache/eventmesh/connector/file/source/FileSourceConnector.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
public class FileSourceConnector implements SourceConnector {
3636

3737
private java.io.BufferedReader reader;
38+
3839
@Override
3940
public void init(Properties props) {
4041
try {
@@ -43,10 +44,12 @@ public void init(Properties props) {
4344
throw new RuntimeException(e);
4445
}
4546
}
47+
4648
@Override
4749
public List<CloudEvent> poll() {
48-
if (reader == null)
50+
if (reader == null) {
4951
return Collections.emptyList();
52+
}
5053
List<CloudEvent> out = new ArrayList<>();
5154
try {
5255
String line;
@@ -61,6 +64,7 @@ public List<CloudEvent> poll() {
6164
}
6265
return out;
6366
}
67+
6468
@Override
6569
public void commit(CloudEvent lastPublished) {
6670

0 commit comments

Comments
 (0)