Skip to content

Commit

Permalink
improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Dec 7, 2024
1 parent 223f8ef commit e9a1fab
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ public void mapKeysFromValueOf() {
" private final Map<Integer, Object> map = new HashMap<>();",
" private final Map<Long, Object> longMap = new HashMap<>();",
" static Integer valueOf(int i) { return 0; }",
" static Integer valueOf(int i, int j) { return i+j; }",
" public void putThenGetIntegerValueOf() {",
" map.put(Integer.valueOf(10), new Object());",
" map.get(Integer.valueOf(10)).toString();",
Expand All @@ -460,6 +461,10 @@ public void mapKeysFromValueOf() {
" // Unknown valueOf method so we report a warning",
" // BUG: Diagnostic contains: dereferenced expression map.get(valueOf(10)) is @Nullable",
" map.get(valueOf(10)).toString();",
" map.put(valueOf(10,20), new Object());",
" // Unknown valueOf method so we report a warning",
" // BUG: Diagnostic contains: dereferenced expression map.get(valueOf(10,20)) is @Nullable",
" map.get(valueOf(10,20)).toString();",
" }",
"}")
.doTest();
Expand Down

0 comments on commit e9a1fab

Please sign in to comment.