Skip to content

Commit f1179cc

Browse files
committed
Java: Follow-up changes
1 parent de3dc73 commit f1179cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/ql/src/semmle/code/java/dataflow/internal/DataFlowPrivate.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ predicate clearsContent(Node n, Content c) {
209209
* possible flow. A single type is used for all numeric types to account for
210210
* numeric conversions, and otherwise the erasure is used.
211211
*/
212-
DataFlowType getErasedRepr(Type t) {
212+
private DataFlowType getErasedRepr(Type t) {
213213
exists(Type e | e = t.getErasure() |
214214
if e instanceof NumericOrCharType
215215
then result.(BoxedType).getPrimitiveType().getName() = "double"
@@ -222,6 +222,9 @@ DataFlowType getErasedRepr(Type t) {
222222
t instanceof NullType and result instanceof TypeObject
223223
}
224224

225+
pragma[noinline]
226+
DataFlowType getNodeType(Node n) { result = getErasedRepr(n.getTypeBound()) }
227+
225228
/** Gets a string representation of a type returned by `getErasedRepr`. */
226229
string ppReprType(Type t) {
227230
if t.(BoxedType).getPrimitiveType().getName() = "double"

0 commit comments

Comments
 (0)