Cleanup use of Guava library
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / RangeConstraintImpl.java
index f1e76b14e7ffb438ebd5540b753d98b20cea01ac..8ed0ad973bb0936b4654fcc1eb46b67a5d63a83a 100644 (file)
@@ -7,9 +7,9 @@
  */
 package org.opendaylight.yangtools.yang.model.util;
 
-import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import java.util.Objects;
+import java.util.Optional;
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
 
@@ -45,8 +45,8 @@ final class RangeConstraintImpl implements RangeConstraint, Immutable {
             final Optional<String> reference, final String errorAppTag, final String errorMessage) {
         this.min = Preconditions.checkNotNull(min, "min must not be null.");
         this.max = Preconditions.checkNotNull(max, "max must not be null.");
-        this.description = description.orNull();
-        this.reference = reference.orNull();
+        this.description = description.orElse(null);
+        this.reference = reference.orElse(null);
         this.errorAppTag = errorAppTag != null ? errorAppTag : "range-out-of-specified-bounds";
         this.errorMessage = errorMessage != null ? errorMessage : "The argument is out of bounds <" + min + ", " + max
                 + ">";