projects
/
jFCPlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use diamond operator
[jFCPlib.git]
/
src
/
test
/
java
/
net
/
pterodactylus
/
fcp
/
fake
/
FakeTcpServer.java
diff --git
a/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java
b/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java
index
6b3674a
..
67a1fdc
100644
(file)
--- a/
src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java
+++ b/
src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java
@@
-31,12
+31,9
@@
public class FakeTcpServer implements AutoCloseable {
}
public Future<?> connect() throws IOException {
}
public Future<?> connect() throws IOException {
- return executorService.submit(new Callable<Void>() {
- @Override
- public Void call() throws Exception {
- clientSocket.set(new TextSocket(serverSocket.accept()));
- return null;
- }
+ return executorService.submit(() -> {
+ clientSocket.set(new TextSocket(serverSocket.accept()));
+ return null;
});
}
});
}
@@
-44,8
+41,10
@@
public class FakeTcpServer implements AutoCloseable {
return clientSocket.get().collectUntil(lineMatcher);
}
return clientSocket.get().collectUntil(lineMatcher);
}
- public void writeLine(String line) throws IOException {
- clientSocket.get().writeLine(line);
+ public void writeLine(String... lines) throws IOException {
+ for (String line : lines) {
+ clientSocket.get().writeLine(line);
+ }
}
public String readLine() throws IOException {
}
public String readLine() throws IOException {