Skip to content

Commit 14488cb

Browse files
authored
Merge pull request #652 from aschackmull/java/constant-loop-cond-alert-pos
Java: Change alert location for ConstantLoopCondition.
2 parents 98005ed + bfc7fb7 commit 14488cb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ where
8181
not exists(MethodAccess ma | ma.getParent*() = cond) and
8282
not exists(FieldRead fa | fa.getParent*() = cond) and
8383
not exists(ArrayAccess aa | aa.getParent*() = cond)
84-
select loop, "Loop might not terminate, as this $@ is constant within the loop.", cond,
85-
"loop condition"
84+
select cond, "$@ might not terminate, as this loop condition is constant within the loop.", loop,
85+
"Loop"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| A.java:6:5:6:16 | stmt | Loop might not terminate, as this $@ is constant within the loop. | A.java:6:11:6:15 | !... | loop condition |
2-
| A.java:12:5:12:19 | stmt | Loop might not terminate, as this $@ is constant within the loop. | A.java:13:11:13:15 | ... > ... | loop condition |
3-
| A.java:27:5:27:38 | stmt | Loop might not terminate, as this $@ is constant within the loop. | A.java:27:20:27:32 | ... < ... | loop condition |
1+
| A.java:6:11:6:15 | !... | $@ might not terminate, as this loop condition is constant within the loop. | A.java:6:5:6:16 | stmt | Loop |
2+
| A.java:13:11:13:15 | ... > ... | $@ might not terminate, as this loop condition is constant within the loop. | A.java:12:5:12:19 | stmt | Loop |
3+
| A.java:27:20:27:32 | ... < ... | $@ might not terminate, as this loop condition is constant within the loop. | A.java:27:5:27:38 | stmt | Loop |

0 commit comments

Comments
 (0)