#2213 code improvement by sonar

This commit is contained in:
igarashi 2019-08-21 11:39:40 +09:00
parent dce8cd4507
commit 6aa97ae660

View file

@ -145,7 +145,7 @@ public class PluginTests extends CrudTestBase {
checkGetMethod(Collections.emptyMap(), getInstalledEndpointSuffix() + "/").body().jsonPath()
.get("response.plugins");
boolean exists =
installed.stream().map(o -> getArtifactFromMap(o))
installed.stream().map(this::getArtifactFromMap)
.anyMatch(a -> a.getName().equals(target.getName()) && a.getVersion().equals(target.getVersion()));
if (!exists) {
Thread.sleep(500);
@ -167,7 +167,7 @@ public class PluginTests extends CrudTestBase {
checkGetMethod(Collections.emptyMap(), getInstalledEndpointSuffix() + "/").body().jsonPath()
.get("response.plugins");
boolean exists =
installed.stream().map(o -> getArtifactFromMap(o))
installed.stream().map(this::getArtifactFromMap)
.anyMatch(a -> a.getName().equals(target.getName()) && a.getVersion().equals(target.getVersion()));
if (exists) {
Thread.sleep(500);
@ -181,7 +181,7 @@ public class PluginTests extends CrudTestBase {
}
}
protected Artifact getArtifactFromMap(final Map<String, Object> item) {
private Artifact getArtifactFromMap(final Map<String, Object> item) {
return new Artifact((String) item.get("name"), (String) item.get("version"));
}
}