mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
java: fixes from the CI bots
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// If the variable is involved in several different monitors, we get an alert for each monitor that
|
||||
// is not correctly used.
|
||||
// A single alert can have many related locations, since each conflicting access which is not
|
||||
// prpoerly synchronized is a related location.
|
||||
// properly synchronized is a related location.
|
||||
// This leads to many lines in the .expected file.
|
||||
package examples;
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
@ThreadSafe
|
||||
public class Test {
|
||||
/**
|
||||
* Escaping field due to public visuability.
|
||||
* Escaping field due to public visibility.
|
||||
*/
|
||||
int publicField;
|
||||
|
||||
private int y;
|
||||
final int immutableField = 1;
|
||||
|
||||
// As of the below examples with synchronized as well. Except the incorretly placed lock.
|
||||
// As of the below examples with synchronized as well. Except the incorrectly placed lock.
|
||||
|
||||
private Lock lock = new ReentrantLock();
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Test {
|
||||
}
|
||||
|
||||
/**
|
||||
* Incorretly locks y.
|
||||
* Incorrectly locks y.
|
||||
* @param y
|
||||
*/
|
||||
public void setYWrongLock(int y) {
|
||||
|
||||
Reference in New Issue
Block a user