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

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Java: Add a couple of Oxford commas
  • Loading branch information
igfoo committed Mar 27, 2024
commit 59ae6dd5f576456c77c94307f655de82bc3be32e
4 changes: 2 additions & 2 deletions java/ql/src/Likely Bugs/Statements/MissingEnumInSwitch.ql
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ EnumConstant nthMissing(SwitchStmt switch, int index) {
predicate first3(string msg, SwitchStmt switch, EnumConstant e1, EnumConstant e2, EnumConstant e3) {
exists(int n | n = strictcount(nthMissing(switch, _)) |
if n > 3
then msg = "Switch statement does not have a case for $@, $@, $@ or " + (n - 3) + " more."
else msg = "Switch statement does not have a case for $@, $@ or $@."
then msg = "Switch statement does not have a case for $@, $@, $@, or " + (n - 3) + " more."
else msg = "Switch statement does not have a case for $@, $@, or $@."
) and
e1 = nthMissing(switch, 1) and
e2 = nthMissing(switch, 2) and
Expand Down