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

Skip to content

Commit 73f1bee

Browse files
committed
Java: Fix likely bug in ExposeRepresentation and re-autoformat.
1 parent 6a8a272 commit 73f1bee

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

java/ql/src/Violations of Best Practice/Implementation Hiding/ExposeRepresentation.ql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ predicate mayWriteToArray(Expr modified) {
8181

8282
predicate writesToArray(Expr array) {
8383
relevantType(array.getType()) and
84-
(exists(Assignment a, ArrayAccess access | a.getDest() = access | access.getArray() = array))
85-
or
86-
exists(MethodAccess ma | ma.getQualifier() = array | modifyMethod(ma.getMethod()))
84+
(
85+
exists(Assignment a, ArrayAccess access | a.getDest() = access | access.getArray() = array)
86+
or
87+
exists(MethodAccess ma | ma.getQualifier() = array | modifyMethod(ma.getMethod()))
88+
)
8789
}
8890

8991
VarAccess modificationAfter(VarAccess v) {

0 commit comments

Comments
 (0)