#2213 code improvement by sonar
This commit is contained in:
parent
dce8cd4507
commit
6aa97ae660
1 changed files with 3 additions and 3 deletions
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue