Skip to content

Commit a4dac9f

Browse files
authored
Merge pull request github#9201 from Marcono1234/marcono1234/NumericType-type-qll
Java: Move `NumericType` to `Type.qll`
2 parents 209a1e4 + c53d315 commit a4dac9f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

java/ql/lib/semmle/code/java/JDK.qll

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,6 @@ class NumberType extends RefType {
144144
NumberType() { exists(TypeNumber number | hasDescendant(number, this)) }
145145
}
146146

147-
/** A numeric type, including both primitive and boxed types. */
148-
class NumericType extends Type {
149-
NumericType() {
150-
exists(string name |
151-
name = this.(PrimitiveType).getName() or
152-
name = this.(BoxedType).getPrimitiveType().getName()
153-
|
154-
name.regexpMatch("byte|short|int|long|double|float")
155-
)
156-
}
157-
}
158-
159147
/** An immutable type. */
160148
class ImmutableType extends Type {
161149
ImmutableType() {

java/ql/lib/semmle/code/java/Type.qll

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,18 @@ class CharacterType extends Type {
12461246
}
12471247
}
12481248

1249+
/** A numeric type, including both primitive and boxed types. */
1250+
class NumericType extends Type {
1251+
NumericType() {
1252+
exists(string name |
1253+
name = this.(PrimitiveType).getName() or
1254+
name = this.(BoxedType).getPrimitiveType().getName()
1255+
|
1256+
name.regexpMatch("byte|short|int|long|double|float")
1257+
)
1258+
}
1259+
}
1260+
12491261
/** A numeric or character type, which may be either a primitive or a boxed type. */
12501262
class NumericOrCharType extends Type {
12511263
NumericOrCharType() {

0 commit comments

Comments
 (0)