mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
23 lines
385 B
Java
23 lines
385 B
Java
package nullLiterals;
|
|
|
|
public class NullLiterals {
|
|
Object[] nulls = {
|
|
null,
|
|
// Using Unicode escapes (which are handled during pre-processing)
|
|
\u006E\u0075\u006C\u006C, // null
|
|
};
|
|
|
|
// The operation expressions (e.g. cast) are not a literal
|
|
Object[] operations = {
|
|
(Object) null,
|
|
};
|
|
|
|
Object[] nonNullLiterals = {
|
|
"null",
|
|
0,
|
|
Boolean.FALSE,
|
|
};
|
|
|
|
Object nonLiteral;
|
|
}
|