Skip to content

Commit 640b450

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: add message column to qltest
1 parent bf6148c commit 640b450

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| java.lang.String#valueOf(Object) |
2-
| java.lang.Throwable#printStackTrace() |
3-
| java.util.stream.Stream#collect(Collector) |
1+
| java.lang.String#valueOf(Object) | no manual model |
2+
| java.lang.Throwable#printStackTrace() | no manual model |
3+
| java.util.stream.Stream#collect(Collector) | no manual model |

java/ql/test/ext/TopJdkApis/TopJdkApisTest.ql

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ import java
22
import semmle.code.java.dataflow.ExternalFlow
33
import TopJdkApis
44

5-
from string apiName
5+
from string apiName, string message
66
where
77
// top jdk api names for which there is no callable
88
topJdkApiName(apiName) and
9-
not hasCallable(apiName)
9+
not hasCallable(apiName) and
10+
message = "no callable"
1011
or
1112
// top jdk api names for which there isn't a manual model
1213
exists(TopJdkApi topApi |
1314
not topApi.hasManualMadModel() and
1415
apiName =
1516
topApi.asCallable().getDeclaringType().getPackage() + "." +
1617
topApi.asCallable().getDeclaringType().getSourceDeclaration() + "#" +
17-
topApi.asCallable().getName() + paramsString(topApi.asCallable())
18+
topApi.asCallable().getName() + paramsString(topApi.asCallable()) and
19+
message = "no manual model"
1820
)
19-
select apiName order by apiName
21+
select apiName, message order by apiName

0 commit comments

Comments
 (0)