Skip to content

Commit

Permalink
BAEL-1736 fix (eugenp#4271)
Browse files Browse the repository at this point in the history
  • Loading branch information
myluckagain authored and pivovarit committed May 22, 2018
1 parent 087f0c2 commit d98b696
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public void whenCompute_thenForAllKeys() {
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));

Expand Down Expand Up @@ -271,4 +271,4 @@ public void whenReplaceall_thenNoIterationNeeded() {

assertThat(table.values(), hasItems("cat - a small domesticated carnivorous mammal", "dog - another animal"));
}
}
}

0 comments on commit d98b696

Please sign in to comment.