import org.apache.commons.lang.math.NumberUtils;
import org.sonar.api.qualitymodel.Characteristic;
+import javax.annotation.Nullable;
+
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date;
* @param v the measure value
* @return the measure object instance
*/
- public Measure setValue(Double v) {
+ public Measure setValue(@Nullable Double v) {
return setValue(v, DEFAULT_PRECISION);
}
* @param precision the measure value precision
* @return the measure object instance
*/
- public Measure setValue(Double v, int precision) {
+ public Measure setValue(@Nullable Double v, int precision) {
if (v != null) {
if (Double.isNaN(v)) {
throw new IllegalArgumentException("Measure value can not be NaN");