Skip to content

Commit 15161d8

Browse files
committed
Make concrete subclasses of abstract classes
1 parent 53ee465 commit 15161d8

File tree

1 file changed

+24
-6
lines changed
  • java/ql/test/library-tests/frameworks/apache-collections

1 file changed

+24
-6
lines changed

java/ql/test/library-tests/frameworks/apache-collections/TestNew.java

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@ public void test() throws Exception {
285285
// "org.apache.commons.collections4.bidimap;AbstractSortedBidiMapDecorator;true;AbstractSortedBidiMapDecorator;;;MapKey of Argument[0];MapKey of Argument[-1];value"
286286
AbstractSortedBidiMapDecorator out = null;
287287
SortedBidiMap in = (SortedBidiMap)newWithMapKey(source());
288-
out = new AbstractSortedBidiMapDecorator(in);
288+
out = new MyAbstractSortedBidiMapDecorator(in);
289289
sink(getMapKey(out)); // $ hasValueFlow
290290
}
291291
{
292292
// "org.apache.commons.collections4.bidimap;AbstractSortedBidiMapDecorator;true;AbstractSortedBidiMapDecorator;;;MapValue of Argument[0];MapValue of Argument[-1];value"
293293
AbstractSortedBidiMapDecorator out = null;
294294
SortedBidiMap in = (SortedBidiMap)newWithMapValue(source());
295-
out = new AbstractSortedBidiMapDecorator(in);
295+
out = new MyAbstractSortedBidiMapDecorator(in);
296296
sink(getMapValue(out)); // $ hasValueFlow
297297
}
298298
{
@@ -1575,28 +1575,28 @@ public void test() throws Exception {
15751575
// "org.apache.commons.collections4.map;AbstractOrderedMapDecorator;true;AbstractOrderedMapDecorator;(OrderedMap);;MapKey of Argument[0];MapKey of Argument[-1];value"
15761576
AbstractOrderedMapDecorator out = null;
15771577
OrderedMap in = (OrderedMap)newWithMapKey(source());
1578-
out = new AbstractOrderedMapDecorator(in);
1578+
out = new MyAbstractOrderedMapDecorator(in);
15791579
sink(getMapKey(out)); // $ hasValueFlow
15801580
}
15811581
{
15821582
// "org.apache.commons.collections4.map;AbstractOrderedMapDecorator;true;AbstractOrderedMapDecorator;(OrderedMap);;MapValue of Argument[0];MapValue of Argument[-1];value"
15831583
AbstractOrderedMapDecorator out = null;
15841584
OrderedMap in = (OrderedMap)newWithMapValue(source());
1585-
out = new AbstractOrderedMapDecorator(in);
1585+
out = new MyAbstractOrderedMapDecorator(in);
15861586
sink(getMapValue(out)); // $ hasValueFlow
15871587
}
15881588
{
15891589
// "org.apache.commons.collections4.map;AbstractSortedMapDecorator;true;AbstractSortedMapDecorator;(SortedMap);;MapKey of Argument[0];MapKey of Argument[-1];value"
15901590
AbstractSortedMapDecorator out = null;
15911591
SortedMap in = (SortedMap)newWithMapKey(source());
1592-
out = new AbstractSortedMapDecorator(in);
1592+
out = new MyAbstractSortedMapDecorator(in);
15931593
sink(getMapKey(out)); // $ hasValueFlow
15941594
}
15951595
{
15961596
// "org.apache.commons.collections4.map;AbstractSortedMapDecorator;true;AbstractSortedMapDecorator;(SortedMap);;MapValue of Argument[0];MapValue of Argument[-1];value"
15971597
AbstractSortedMapDecorator out = null;
15981598
SortedMap in = (SortedMap)newWithMapValue(source());
1599-
out = new AbstractSortedMapDecorator(in);
1599+
out = new MyAbstractSortedMapDecorator(in);
16001600
sink(getMapValue(out)); // $ hasValueFlow
16011601
}
16021602
{
@@ -3128,4 +3128,22 @@ public void test() throws Exception {
31283128

31293129
}
31303130

3131+
class MyAbstractSortedBidiMapDecorator<K, V> extends AbstractSortedBidiMapDecorator<K, V> {
3132+
public MyAbstractSortedBidiMapDecorator(final SortedBidiMap<K, V> map) {
3133+
super(map);
3134+
}
3135+
}
3136+
3137+
class MyAbstractOrderedMapDecorator<K, V> extends AbstractOrderedMapDecorator<K, V> {
3138+
public MyAbstractOrderedMapDecorator(final OrderedMap<K, V> map) {
3139+
super(map);
3140+
}
3141+
}
3142+
3143+
class MyAbstractSortedMapDecorator<K, V> extends AbstractSortedMapDecorator<K, V> {
3144+
public MyAbstractSortedMapDecorator(final SortedMap<K, V> map) {
3145+
super(map);
3146+
}
3147+
}
3148+
31313149
}

0 commit comments

Comments
 (0)