mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
java: rewrite conflict detection
- favour unary predicates over binary ones (the natural "conflicting access" is binary) - switch to a dual solution to trade recursion through forall for simple existentials. Co-authored-by: Anders Schack-Mulligen <aschackmull@github.com>
This commit is contained in:
@@ -37,11 +37,11 @@ class FaultySyncLstExample<T> {
|
||||
|
||||
public void add(T item) {
|
||||
lock.lock();
|
||||
lst.add(item); // $ Alert
|
||||
lst.add(item);
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
public void remove(int i) {
|
||||
lst.remove(i);
|
||||
lst.remove(i); // $ Alert
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user