Fixed the RT value check
@@ -38,16 +38,16 @@ public class RTRangeParameter extends DoubleRangeParameter {
@Override
public boolean checkValue(Collection<String> errorMessages) {
- if (this.getValue() == null) {
+ if (valueRequired && (this.getValue() == null)) {
errorMessages.add(this.getName() + " is not set properly");
return false;
}
- else if (this.getValue().lowerEndpoint() <= 0.0) {
- errorMessages.add("lower end point must be greater than zero");
+ if ((this.getValue() != null) && (this.getValue().lowerEndpoint() < 0.0)) {
+ errorMessages.add("RT lower end point must not be negative");
return false;
}
- else if (this.getValue().upperEndpoint() <= this.getValue().lowerEndpoint()) {
- errorMessages.add("lower end point must be less than upper end point");
+ if ((this.getValue() != null) && (this.getValue().upperEndpoint() <= this.getValue().lowerEndpoint())) {
+ errorMessages.add("RT lower end point must be less than upper end point");
return false;
}
