Skip to content

Commit ba4a562

Browse files
committed
Update PrintAst.actual with new test output
1 parent 028e475 commit ba4a562

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

java/ql/src/semmle/code/java/PrintAst.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ class PrintAstConfigurationOverride extends PrintAstConfiguration {
1616
/**
1717
* TWEAK THIS PREDICATE AS NEEDED.
1818
*/
19-
override predicate shouldPrint(Element e, Location l) { super.shouldPrint(e, l) and
20-
not l.getFile().getBaseName().matches("SystemGetPropertyCall.java") }
19+
override predicate shouldPrint(Element e, Location l) { super.shouldPrint(e, l) }
2120
}

java/ql/test/library-tests/JDK/PrintAst.expected

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,38 @@ jdk/A.java:
6060
# 28| 0: [ArrayTypeAccess] ...[]
6161
# 28| 0: [TypeAccess] String
6262
# 28| 5: [BlockStmt] stmt
63+
jdk/SystemGetPropertyCall.java:
64+
# 0| [CompilationUnit] SystemGetPropertyCall
65+
# 3| 1: [Class] SystemGetPropertyCall
66+
# 4| 3: [FieldDeclaration] String USER_DIR_PROPERTY, ...;
67+
# 4| -1: [TypeAccess] String
68+
# 4| 0: [StringLiteral] "user.dir"
69+
# 6| 4: [Method] a
70+
# 6| 3: [TypeAccess] void
71+
# 6| 5: [BlockStmt] stmt
72+
# 7| 0: [ExprStmt] stmt
73+
# 7| 0: [MethodAccess] getProperty(...)
74+
# 7| -1: [TypeAccess] System
75+
# 7| 0: [StringLiteral] "user.dir"
76+
# 10| 5: [Method] b
77+
# 10| 3: [TypeAccess] void
78+
# 10| 5: [BlockStmt] stmt
79+
# 11| 0: [ExprStmt] stmt
80+
# 11| 0: [MethodAccess] getProperty(...)
81+
# 11| -1: [TypeAccess] System
82+
# 11| 0: [StringLiteral] "user.dir"
83+
# 11| 1: [StringLiteral] "HOME"
84+
# 14| 6: [Method] c
85+
# 14| 3: [TypeAccess] void
86+
# 14| 5: [BlockStmt] stmt
87+
# 15| 0: [ExprStmt] stmt
88+
# 15| 0: [MethodAccess] getProperty(...)
89+
# 15| -1: [TypeAccess] System
90+
# 15| 0: [VarAccess] USER_DIR_PROPERTY
91+
# 18| 7: [Method] d
92+
# 18| 3: [TypeAccess] void
93+
# 18| 5: [BlockStmt] stmt
94+
# 19| 0: [ExprStmt] stmt
95+
# 19| 0: [MethodAccess] getProperty(...)
96+
# 19| -1: [TypeAccess] System
97+
# 19| 0: [StringLiteral] "random.property"

0 commit comments

Comments
 (0)