Please provide
- Operating system: Windows 10
- SonarLint plugin version: 10.0.1.77000
- Programming language you’re coding in: Java
- Is connected mode used: None
- Connected to SonarCloud or SonarQube (and which version):
And a thorough description of the problem / question:
Currently making a software to store info on plants and to print signs with information on those plants
On of my class called Exposition which stores information on the type of light exposition needed by the plant possess 3 fields names sun, partSun and shade which are of type javafx.beans.property.BooleanProperty
sonarLint is giving me issues with my field called sun when i try to access its methods with this message: Use classes from the Java API instead of Sun classes
and i cannot tell sonarLint to ignore
below is a small example of the class with the problematic parts
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
public class Exposition {
private BooleanProperty sun;
public Exposition(){
sun = new SimpleBooleanProperty(false);
}
public BooleanProperty sunProperty(){
return sun;
}
public String asString(){
return (sun.get() ? "1" : "0"); <-- the sun.get() is flagged
}
public void copy(Exposition exposition) {
sun.set(exposition.sun.get()); <-- the sun.set() is flagged
}