Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 028e475

Browse files
Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent 54950c2 commit 028e475

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@ class MethodSystemGetProperty extends Method {
212212
}
213213

214214
/**
215-
* Any method access to a method named `getProperty` on class `java.lang.System`.
215+
* An access to a method named `getProperty` on class `java.lang.System`.
216216
*/
217217
class MethodAccessSystemGetProperty extends MethodAccess {
218218
MethodAccessSystemGetProperty() { getMethod() instanceof MethodSystemGetProperty }
219219

220220
/**
221-
* Holds true if this is a compile-time constant call for the specified `propertyName`.
222-
* Eg. `System.getProperty("user.dir")`.
221+
* Holds if this call has a compile-time constant first argument with the value `propertyName`.
222+
* For example: `System.getProperty("user.dir")`.
223223
*/
224224
predicate hasCompileTimeConstantGetPropertyName(string propertyName) {
225225
this.getArgument(0).(CompileTimeConstantExpr).getStringValue() = propertyName

java/ql/test/library-tests/JDK/SystemGetPropertyCall.ql

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
/**
2-
* @name SystemCall
3-
* @description Test the definition of System Get Property
4-
*/
5-
6-
import default
1+
import java
72

83
from MethodAccessSystemGetProperty ma
94
where ma.hasCompileTimeConstantGetPropertyName("user.dir")

0 commit comments

Comments
 (0)