My code currently suffers from "Possible unsafe assignment to a non-final static field in a constructor" (AssignmentToNonFinalStatic in PMD).
The class is written as a singleton class, the property affected by this warning looks like this
private static String myProperty;
and is filled by this construct:
public SystemPropertyUtils() throws ConfigException {
someMethodThrowingConfigException();
myProperty = "someValue" + this.someOtherValueFromAThreadSafeString;
}
Is there an elaborated way to negate this warning?