Skip to content

Commit 7266d9a

Browse files
committed
minor code cleanup/fixes
1 parent 9af016c commit 7266d9a

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/main/java/com/github/brainlag/nsq/NSQCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import java.util.List;
66

77
public class NSQCommand {
8-
String line;
9-
List<byte[]> data = new ArrayList<>();
8+
private String line;
9+
private List<byte[]> data = new ArrayList<>();
1010

11-
private NSQCommand() { /** no instances */ }
11+
private NSQCommand() { /** no instances */}
1212

1313
public void addBytes(byte[] bytes) {
1414
data.add(bytes);

src/main/java/com/github/brainlag/nsq/NSQConsumer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ public NSQConsumer start() {
7070
started = true;
7171
//connect once otherwise we might have to wait one lookupPeriod
7272
connect();
73-
scheduler.scheduleAtFixedRate(() -> {
74-
connect();
75-
}, lookupPeriod, lookupPeriod, TimeUnit.MILLISECONDS);
73+
scheduler.scheduleAtFixedRate(() -> connect(), lookupPeriod, lookupPeriod, TimeUnit.MILLISECONDS);
7674
}
7775
return this;
7876
}

src/test/java/com/github/brainlag/nsq/NSQConsumerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class NSQConsumerTest {
2121
@Test
2222
public void testLongRunningConsumer() throws NSQException, TimeoutException, InterruptedException {
2323
AtomicInteger counter = new AtomicInteger(0);
24-
NSQLookup lookup = new DefaultNSQLookup(mapper);
24+
NSQLookup lookup = new DefaultNSQLookup();
2525
lookup.addLookupAddress(Nsq.getNsqLookupdHost(), 4161);
2626

2727
NSQConsumer consumer = new NSQConsumer(lookup, "test1", "testconsumer", (message) -> {

0 commit comments

Comments
 (0)