Skip to content

Commit 3858166

Browse files
authored
Merge pull request github#3047 from aschackmull/java/typeflow-testcase
Java: Add test case to typeflow qltest.
2 parents 1d5fba8 + e1a0c2d commit 3858166

File tree

1 file changed

+15
-0
lines changed
  • java/ql/test/library-tests/typeflow

1 file changed

+15
-0
lines changed

java/ql/test/library-tests/typeflow/A.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,19 @@ public void m7() {
7070
int i2 = (Integer)x2;
7171
int j2 = i2;
7272
}
73+
74+
public static class C {
75+
private Map<String, String> map;
76+
public static C empty = new C(Collections.emptyMap());
77+
private C(Map<String, String> map) {
78+
this.map = map;
79+
}
80+
public C() {
81+
this(new LinkedHashMap<>());
82+
}
83+
public void put(String k, String v) {
84+
map.put(k, v);
85+
empty.put(k, v);
86+
}
87+
}
7388
}

0 commit comments

Comments
 (0)