Skip to content
This repository was archived by the owner on Sep 8, 2019. It is now read-only.

Commit 7e36fba

Browse files
committed
cosmetics
1 parent 5d4ba0b commit 7e36fba

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/main/java/net/codestory/http/WebServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class WebServer {
4646
private int port;
4747

4848
public WebServer() {
49-
this((routes) -> {
49+
this(routes -> {
5050
});
5151
}
5252

@@ -128,7 +128,7 @@ public int port() {
128128
}
129129

130130
public void reset() {
131-
configure((routes) -> {
131+
configure(routes -> {
132132
});
133133
}
134134

src/main/java/net/codestory/http/io/InputStreams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private InputStreams() {
3131
}
3232

3333
public static byte[] readBytes(InputStream from) throws IOException {
34-
return read(from, (bytes) -> bytes.toByteArray());
34+
return read(from, bytes -> bytes.toByteArray());
3535
}
3636

3737
public static String readString(InputStream from, Charset charset) throws IOException {

src/main/java/net/codestory/http/misc/Fluent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public default <K> Map<K, List<T>> index(Function<? super T, K> toKey) {
287287
for (T value : this) {
288288
K key = toKey.apply(value);
289289

290-
List<T> list = multiMap.computeIfAbsent(key, (k) -> new ArrayList<T>());
290+
List<T> list = multiMap.computeIfAbsent(key, k -> new ArrayList<T>());
291291
list.add(value);
292292
}
293293

src/main/java/net/codestory/http/templating/Site.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private Site() {
5050
pages = memoize(() -> Resources.list()
5151
.stream()
5252
.filter(path -> !path.startsWith("_"))
53-
.map((path) -> Site.pathToMap(path))
53+
.map(path -> Site.pathToMap(path))
5454
.collect(Collectors.<Map<String, Object>>toList())
5555
);
5656

@@ -67,7 +67,7 @@ private Site() {
6767
categories = memoize(() -> {
6868
Map<String, List<Map<String, Object>>> sorted = getPages()
6969
.stream()
70-
.collect(Collectors.groupingBy((page) -> Site.category(page), TreeMap::new, Collectors.toList()));
70+
.collect(Collectors.groupingBy(page -> Site.category(page), TreeMap::new, Collectors.toList()));
7171
return sorted;
7272
});
7373
}

src/test/java/net/codestory/http/testhelpers/AbstractWebServerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ protected RestAssert post(String path) {
6262
}
6363

6464
protected RestAssert post(String path, String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) {
65-
return new RestAssert((given) -> given.parameters(firstParameterName, firstParameterValue, parameterNameValuePairs), request -> request.post(path));
65+
return new RestAssert(given -> given.parameters(firstParameterName, firstParameterValue, parameterNameValuePairs), request -> request.post(path));
6666
}
6767

6868
protected RestAssert post(String path, String body) {
69-
return new RestAssert((given) -> given.body(body), request -> request.post(path));
69+
return new RestAssert(given -> given.body(body), request -> request.post(path));
7070
}
7171

7272
// DELETE
7373
protected RestAssert delete(String path) {
74-
return new RestAssert((given) -> given, request -> request.delete(path));
74+
return new RestAssert(given -> given, request -> request.delete(path));
7575
}
7676

7777
public class RestAssert {

0 commit comments

Comments
 (0)