Skip to content

Commit 17b6e66

Browse files
Apply suggestions from code review
Co-authored-by: Tony Torralba <[email protected]>
1 parent 04cd0db commit 17b6e66

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

java/ql/test/library-tests/constants/constants/Values.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void values(final int notConstant) {
8888
int var_local = final_local; //42
8989
int var_param = notConstant; //Not constant
9090
int var_nonfinald_local = var_field; //Not constant
91-
String concatinatedString = "a" + "b"; //ab
92-
String concatinatedChar = "ab" + 'c'; //abc
91+
String concatenatedString = "a" + "b"; //ab
92+
String concatenatedChar = "ab" + 'c'; //abc
9393
}
9494
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import semmle.code.java.Variable
22

3-
from Variable v, Expr init, RefType enclosing, string constant
3+
from Variable v, CompileTimeConstantExpr init, RefType enclosing, string constant
44
where
55
v.getInitializer() = init and
66
init.getEnclosingCallable().getDeclaringType() = enclosing and
77
enclosing.hasQualifiedName("constants", "Values") and
8-
constant = init.(CompileTimeConstantExpr).getStringValue()
8+
constant = init.getStringValue()
99
select init, constant

0 commit comments

Comments
 (0)