Skip to content

Commit e1a0c2d

Browse files
committed
Java: Add minor test case to typeflow qltest.
1 parent f5a8084 commit e1a0c2d

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)