Skip to content

Commit 54fdfe3

Browse files
committed
Make helper functions more consistent
1 parent 2d31bb8 commit 54fdfe3

File tree

1 file changed

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

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public class Test {
124124
MyAbstractMapEntry newMAMEWithMapKey(Object element) { return new MyAbstractMapEntry(element,null); }
125125
MyAbstractMapEntryDecorator newMAMEDWithMapKey(Object element) { return new MyAbstractMapEntryDecorator(newMAMEWithMapKey(element)); }
126126
MultiValueMap newMVMWithMapKey(Object element) { MultiValueMap m = new MultiValueMap(); m.put(element,null); return m; }
127-
MultiValuedMap newMVdMWithMapKey(Object element) { MultiValuedMap m = new ArrayListValuedHashMap(); m.put(element,null); return m; }
127+
ArrayListValuedHashMap newALVHMWithMapKey(Object element) { ArrayListValuedHashMap m = new ArrayListValuedHashMap(); m.put(element,null); return m; }
128128
OrderedMapIterator newOMIWithElement(Object element) { LinkedMap m = new LinkedMap(); m.put(element,null); return m.mapIterator(); }
129129
ResourceBundle newRBWithMapKey(Object element) { return (ResourceBundle)null; }
130130
SortedMap newTreeMapWithMapKey(Object element) { SortedMap m = new TreeMap(); m.put(element,null); return m; }
@@ -2944,7 +2944,7 @@ public void test() {
29442944
{
29452945
// "org.apache.commons.collections4;MultiMapUtils;true;transformedMultiValuedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value"
29462946
MultiValuedMap out = null;
2947-
MultiValuedMap in = newMVdMWithMapKey((String)source());
2947+
MultiValuedMap in = newALVHMWithMapKey((String)source());
29482948
out = MultiMapUtils.transformedMultiValuedMap(in, null, null);
29492949
sink(getMapKey(out)); // $ hasValueFlow
29502950
}
@@ -2958,7 +2958,7 @@ public void test() {
29582958
{
29592959
// "org.apache.commons.collections4;MultiMapUtils;true;unmodifiableMultiValuedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value"
29602960
MultiValuedMap out = null;
2961-
MultiValuedMap in = newMVdMWithMapKey((String)source());
2961+
MultiValuedMap in = newALVHMWithMapKey((String)source());
29622962
out = MultiMapUtils.unmodifiableMultiValuedMap(in);
29632963
sink(getMapKey(out)); // $ hasValueFlow
29642964
}
@@ -3035,7 +3035,7 @@ public void test() {
30353035
{
30363036
// "org.apache.commons.collections4;MultiValuedMap;true;asMap;;;MapKey of Argument[-1];MapKey of ReturnValue;value"
30373037
Map out = null;
3038-
MultiValuedMap in = newMVdMWithMapKey((String)source());
3038+
MultiValuedMap in = newALVHMWithMapKey((String)source());
30393039
out = in.asMap();
30403040
sink(getMapKey(out)); // $ hasValueFlow
30413041
}
@@ -3063,14 +3063,14 @@ public void test() {
30633063
{
30643064
// "org.apache.commons.collections4;MultiValuedMap;true;keySet;;;MapKey of Argument[-1];Element of ReturnValue;value"
30653065
Set out = null;
3066-
MultiValuedMap in = newMVdMWithMapKey((String)source());
3066+
MultiValuedMap in = newALVHMWithMapKey((String)source());
30673067
out = in.keySet();
30683068
sink(getElement(out)); // $ hasValueFlow
30693069
}
30703070
{
30713071
// "org.apache.commons.collections4;MultiValuedMap;true;keys;;;MapKey of Argument[-1];Element of ReturnValue;value"
30723072
MultiSet out = null;
3073-
MultiValuedMap in = newMVdMWithMapKey((String)source());
3073+
MultiValuedMap in = newALVHMWithMapKey((String)source());
30743074
out = in.keys();
30753075
sink(getElement(out)); // $ hasValueFlow
30763076
}
@@ -3084,7 +3084,7 @@ public void test() {
30843084
{
30853085
// "org.apache.commons.collections4;MultiValuedMap;true;mapIterator;;;MapKey of Argument[-1];Element of ReturnValue;value"
30863086
MapIterator out = null;
3087-
MultiValuedMap in = newMVdMWithMapKey((String)source());
3087+
MultiValuedMap in = newALVHMWithMapKey((String)source());
30883088
out = in.mapIterator();
30893089
sink(getElement(out)); // $ hasValueFlow
30903090
}
@@ -3126,7 +3126,7 @@ public void test() {
31263126
{
31273127
// "org.apache.commons.collections4;MultiValuedMap;true;putAll;(MultiValuedMap);;MapKey of Argument[0];MapKey of Argument[-1];value"
31283128
MultiValuedMap out = null;
3129-
MultiValuedMap in = newMVdMWithMapKey((String)source());
3129+
MultiValuedMap in = newALVHMWithMapKey((String)source());
31303130
out.putAll(in);
31313131
sink(getMapKey(out)); // $ hasValueFlow
31323132
}

0 commit comments

Comments
 (0)