shortDescription <- 'Avoid instantiating Boolean objects; you can reference Boolean.TRUE, Boolean.FALSE, or call Boolean.valueOf() instead. Note that new Boolean() is deprecated since JDK 9 for that reason.'
),
measurement: smm!DirectMeasurement (
error<-'In the Class '+ variable.name + ' an instantiation of Boolean must be Boolean.TRUE, Boolean.FALSE or Boolean.valueOf().'
shortDescription <- 'Calling new Byte() causes memory allocation that can be avoided by the static Byte.valueOf(). It makes use of an internal cache that recycles earlier instances making it more memory efficient. Note that new Byte() is deprecated since JDK 9 for that reason.'
),
measurement: smm!DirectMeasurement (
error<-'In the Class '+ variable.name + ' an instantiation of Byte must be Byte.valueOf().'
)
do {
noc;
}
}
--- A Measure instance if the class violates the rule CloneMethodMustBePublic.
--- Rule for metrics doNotInitBigIntegerWithNew : returns the set of class Measures that instantiate BigInteger objects with "new BigInteger()" statement.