Remove redundant check that can cause an NPE

This commit is contained in:
James Agnew 2020-01-09 08:55:02 -05:00
parent c935ac4ecb
commit e0f3f5cc2c
1 changed files with 1 additions and 6 deletions

View File

@ -53,7 +53,6 @@ package org.hl7.fhir.r5.model;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype;
/**
* Primitive type "integer" in FHIR: A signed 64-bit integer
@ -96,12 +95,8 @@ public class Integer64Type extends PrimitiveType<Long> {
* @throws IllegalArgumentException If the value is too large to fit in a signed integer
*/
public Integer64Type(Long theValue) {
if (theValue < java.lang.Long.MIN_VALUE || theValue > java.lang.Long.MAX_VALUE) {
throw new IllegalArgumentException
(theValue + " cannot be cast to int without changing its value.");
}
if(theValue!=null) {
setValue((long)theValue.longValue());
setValue(theValue);
}
}