BAEL-1736 fix (#4271)

This commit is contained in:
myluckagain 2018-05-22 13:56:17 +05:00 committed by Grzegorz Piwowarek
parent 087f0c24fe
commit d98b696baa
1 changed files with 2 additions and 2 deletions

View File

@ -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"));
}
}
}