Skip to content

Commit 103c770

Browse files
JLLeitschuhsmowton
andauthored
Apply suggestions from code review
Co-authored-by: Chris Smowton <[email protected]>
1 parent fea5006 commit 103c770

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ class StringPartialMatchMethod extends Method {
5252
* The index of the parameter that is being matched against.
5353
*/
5454
int getMatchParameterIndex() {
55-
if not this.hasName("regionMatches")
56-
then result = 0
57-
else this.getParameterType(result) instanceof TypeString
55+
if this.hasName("regionMatches")
56+
then this.getParameterType(result) instanceof TypeString
57+
else result = 0
5858
}
5959
}
6060

java/ql/lib/semmle/code/java/environment/SystemProperty.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import java
22
private import semmle.code.java.frameworks.apache.Lang
33

44
/**
5-
* Gets Expr that return the value of `propertyName` from `System.getProperty()`.
5+
* Gets an expression that retrieves the value of `propertyName` from `System.getProperty()`.
66
*/
77
Expr getSystemProperty(string propertyName) {
88
result = getSystemPropertyFromSystem(propertyName) or

java/ql/lib/semmle/code/java/os/OSCheck.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class IsUnixGuard extends Guard { }
3737
abstract class IsAnyUnixGuard extends Guard { }
3838

3939
/**
40-
* Holds when the MethodAccess is a call to check the current OS using either the upper case `osUpperCase` or lower case `osLowerCase` string constants.
40+
* Holds when `ma` compares the current OS against the string constant `osString`.
4141
*/
4242
bindingset[osString]
4343
private predicate isOsFromSystemProp(MethodAccess ma, string osString) {

java/ql/src/Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private class FileCreateTempFileSink extends FileCreationSink {
104104
}
105105

106106
/**
107-
* A guard that checks whether or not the the program is running on the Windows OS.
107+
* A guard that holds when the program is definitely running under some version of Windows.
108108
*/
109109
abstract private class WindowsOsBarrierGuard extends DataFlow::BarrierGuard { }
110110

0 commit comments

Comments
 (0)