#831 - Polishing.

Applied some recommendations provided by IntelliJ that I stumbled over while reviewing the changes.
This commit is contained in:
Jens Schauder
2019-03-11 17:04:48 +01:00
parent 40250d1738
commit bdd602aa74
13 changed files with 16 additions and 16 deletions

View File

@@ -166,7 +166,7 @@ public class JsonPathLinkDiscoverer implements LinkDiscoverer {
JSONArray jsonArray = (JSONArray) parseResult;
return jsonArray.stream() //
.flatMap(it -> JSONArray.class.isInstance(it) ? ((JSONArray) it).stream() : Stream.of(it)) //
.flatMap(it -> it instanceof JSONArray ? ((JSONArray) it).stream() : Stream.of(it)) //
.map(it -> extractLink(it, rel)) //
.collect(Collectors.collectingAndThen(Collectors.toList(), Links::of));
}

View File

@@ -70,7 +70,7 @@ public class Traverson {
Traverson.class.getClassLoader());
Assert.isTrue(ALL_DEFAULTS.size() == 1,
() -> String.format("Expected to find only one TraversonDefaults instance, but found: ", //
() -> String.format("Expected to find only one TraversonDefaults instance, but found: %s", //
ALL_DEFAULTS.stream() //
.map(Object::getClass) //
.map(Class::getName) //