From 9a6566d5e496d2ebefe8afb6d00aee539003f8de Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 11 Dec 2020 21:15:04 -0800 Subject: [PATCH] Simplify redundant collection operations --- test/src/test/java/hudson/model/ProjectTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/src/test/java/hudson/model/ProjectTest.java b/test/src/test/java/hudson/model/ProjectTest.java index d2e802883b..b60d8748bc 100644 --- a/test/src/test/java/hudson/model/ProjectTest.java +++ b/test/src/test/java/hudson/model/ProjectTest.java @@ -526,8 +526,8 @@ public class ProjectTest { Map relationship = upstream.getRelationship(downstream); assertFalse("Project upstream should have relationship with downstream", relationship.isEmpty()); - assertTrue("Relationship should contain upstream #3", relationship.keySet().contains(3)); - assertFalse("Relationship should not contain upstream #4 because previous fingerprinted file was not changed since #3", relationship.keySet().contains(4)); + assertTrue("Relationship should contain upstream #3", relationship.containsKey(3)); + assertFalse("Relationship should not contain upstream #4 because previous fingerprinted file was not changed since #3", relationship.containsKey(4)); assertEquals("downstream #2 should be the first build which depends on upstream #3", 2, relationship.get(3).min()); assertEquals("downstream #3 should be the last build which depends on upstream #3", 3, relationship.get(3).max()-1); assertEquals("downstream #4 should depend only on upstream #5", 4, relationship.get(5).min());