Skip to content

Commit a33e0bc

Browse files
committed
Fix tests affected by Jackson stubs changes
1 parent 08bdd1a commit a33e0bc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../stubs/gson-2.8.6/:${testdir}/../../../../stubs/jackson-databind-2.12/:${testdir}/../../../../stubs/springframework-5.3.8/
1+
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../stubs/gson-2.8.6/:${testdir}/../../../../stubs/jackson-databind-2.12/:${testdir}/../../../../stubs/jackson-core-2.12:${testdir}/../../../../stubs/springframework-5.3.8/

java/ql/test/library-tests/dataflow/taint-jackson/Test.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static String taint() {
2929

3030
public static void sink(Object any) {}
3131

32-
public static void jacksonObjectMapper() throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException {
32+
public static void jacksonObjectMapper() throws Exception {
3333
String s = taint();
3434
ObjectMapper om = new ObjectMapper();
3535
File file = new File("testFile");
@@ -52,7 +52,7 @@ public static void jacksonObjectMapper() throws java.io.FileNotFoundException, j
5252
sink(reconstructed); //$hasTaintFlow
5353
}
5454

55-
public static void jacksonObjectWriter() throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException {
55+
public static void jacksonObjectWriter() throws Exception {
5656
String s = taint();
5757
ObjectWriter ow = new ObjectWriter();
5858
File file = new File("testFile");
@@ -89,7 +89,7 @@ public static void jacksonObjectReaderIterable() throws java.io.IOException {
8989
ObjectMapper om = new ObjectMapper();
9090
ObjectReader reader = om.readerFor(Potato.class);
9191
sink(reader.readValues(s)); //$hasTaintFlow
92-
Iterator<Potato> pIterator = reader.readValues(s, Potato.class);
92+
Iterator<Potato> pIterator = reader.readValues(s);
9393
while(pIterator.hasNext()) {
9494
Potato p = pIterator.next();
9595
sink(p); //$hasTaintFlow
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/jackson-databind-2.12
1+
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/jackson-databind-2.12:${testdir}/../../../stubs/jackson-core-2.12
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/springframework-5.3.8:${testdir}/../../../stubs/google-android-9.0.0:${testdir}/../../../stubs/playframework-2.6.x:${testdir}/../../../stubs/jackson-databind-2.12:${testdir}/../../../stubs/akka-2.6.x
1+
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/springframework-5.3.8:${testdir}/../../../stubs/google-android-9.0.0:${testdir}/../../../stubs/playframework-2.6.x:${testdir}/../../../stubs/jackson-databind-2.12:${testdir}/../../../stubs/jackson-core-2.12:${testdir}/../../../stubs/akka-2.6.x

0 commit comments

Comments
 (0)