File tree Expand file tree Collapse file tree
java/ql/test/library-tests/frameworks/spring/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545// Test case generated by GenerateFlowTestCase.ql
4646public class Test {
4747
48- Object getArrayElement (Object container ) { return (( Object []) container ) [0 ]; }
48+ Object getArrayElement (Object [] container ) { return container [0 ]; }
4949 Object getElement (Collection container ) { return container .iterator ().next (); }
5050 Object getElement (Iterator container ) { return container .next (); }
5151 Object getMapKey (Map container ) { return container .keySet ().iterator ().next (); }
5252 Object getMapValue (Map container ) { return container .get (null ); }
5353 Object [] newWithArrayElement (Object element ) { return new Object [] {element }; }
54- // Object newWithMapKey(Object element) { return null; }
5554 Properties newPropertiesWithMapKey (Object element ) { Properties p = new Properties (); p .put (element , null ); return p ; }
56- // Object newWithMapValue(Object element) { return null; }
5755 Properties newPropertiesWithMapValue (Object element ) { Properties p = new Properties (); p .put (null , element ); return p ; }
5856 static Object source () { return null ; }
5957 static void sink (Object o ) { }
Original file line number Diff line number Diff line change 11import java
22import semmle.code.java.dataflow.DataFlow
3- import semmle.code.java.dataflow.ExternalFlow
43import semmle.code.java.dataflow.TaintTracking
54import TestUtilities.InlineExpectationsTest
65
You can’t perform that action at this time.
0 commit comments