package net.ripe.commons.ip.resource;

import java.io.Serializable;
import org.apache.commons.lang3.Validate;

public abstract class SingleValue<T> extends EqualsSupport implements Serializable {

    private static final long serialVersionUID = 1L;

    private final T value;

    protected SingleValue(T value) {
        Validate.notNull(value, "value is required");
        this.value = value;
    }

    public T value() {
        return value;
    }

    public static <T> T valueOrElse(SingleValue<T> singleValue, T orElse) {
        return singleValue == null ? orElse : singleValue.value();
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }
}

@@ -316,16 +316,29 @@
 %0A       
+ this.value =
  Validat
@@ -380,36 +380,8 @@
 %22);%0A
-        this.value = value;%0A
     

Use commons-lang3 style validation.