...
Code Block | ||
---|---|---|
| ||
public class SomeObject {
public final Object lock = new Object();
public void changeValue() {
synchronized (lock) {
// ...
}
}
}
// Untrusted code
SomeObject someObject = new SomeObject();
someObject.lock.wait();
|
...
This noncompliant code example also violates rule OBJ01-J. Limit accessibility of fields.
...