BAEL-1736 fix (#4271)
This commit is contained in:
parent
087f0c24fe
commit
d98b696baa
|
@ -233,7 +233,7 @@ public class HashtableUnitTest {
|
|||
Hashtable<String, Integer> table = new Hashtable<String, Integer>();
|
||||
String[] animals = { "cat", "dog", "dog", "cat", "bird", "mouse", "mouse" };
|
||||
for (String animal : animals) {
|
||||
table.compute(animal, (key, value) -> (value == null ? Integer.valueOf(1) : Integer.valueOf(value) + 1));
|
||||
table.compute(animal, (key, value) -> (value == null ? 1 : value + 1));
|
||||
}
|
||||
assertThat(table.values(), hasItems(2, 2, 2, 1));
|
||||
|
||||
|
@ -271,4 +271,4 @@ public class HashtableUnitTest {
|
|||
|
||||
assertThat(table.values(), hasItems("cat - a small domesticated carnivorous mammal", "dog - another animal"));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue