manifold-ij
manifold-ij copied to clipboard
Warning when Synchronize on @val property
When using Manifold properties, annotating a field with @val makes the field final.
However, when using that field in a synchronized block, I get a warning message: Synchronization on a non-final field. This warning should be suppressed.
public class Foo{
@val Object object;
public Foo(Object object){
this.object = object;
}
public void doSomething(){
synchronized(object){ // <-- Synchronization on a non-final field warning
...
}
}
}