Java: Change alert location for ConstantLoopCondition.

This commit is contained in:
Anders Schack-Mulligen
2018-12-10 12:37:11 +00:00
parent 6ef16bb728
commit bfc7fb7c8a
2 changed files with 5 additions and 5 deletions

View File

@@ -81,5 +81,5 @@ where
not exists(MethodAccess ma | ma.getParent*() = cond) and
not exists(FieldRead fa | fa.getParent*() = cond) and
not exists(ArrayAccess aa | aa.getParent*() = cond)
select loop, "Loop might not terminate, as this $@ is constant within the loop.", cond,
"loop condition"
select cond, "$@ might not terminate, as this loop condition is constant within the loop.", loop,
"Loop"

View File

@@ -1,3 +1,3 @@
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |