BUG-865: deprecate internal implementation classes
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / AbstractUnsignedInteger.java
index d791c8870819184e2169f90c7b5343a5cecb1b80..22f73fcfada4d155ab96be26091deac2961723a0 100644 (file)
@@ -33,7 +33,9 @@ import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinit
  * inclusively.</li>
  * </ul>
  *
+ * @deprecated Used only by deprecated {@link Uint8} and friends.
  */
+@Deprecated
 abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefinition {
     private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.2";
     private static final Optional<String> OPT_REF = Optional.of("https://tools.ietf.org/html/rfc6020#section-9.2.4");
@@ -131,39 +133,19 @@ abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefinition
             return false;
         }
         AbstractUnsignedInteger other = (AbstractUnsignedInteger) obj;
-        if (description == null) {
-            if (other.description != null) {
-                return false;
-            }
-        } else if (!description.equals(other.description)) {
+        if (!Objects.equals(description, other.description)) {
             return false;
         }
-        if (name == null) {
-            if (other.name != null) {
-                return false;
-            }
-        } else if (!name.equals(other.name)) {
+        if (!Objects.equals(name, other.name)) {
             return false;
         }
-        if (path == null) {
-            if (other.path != null) {
-                return false;
-            }
-        } else if (!path.equals(other.path)) {
+        if (!Objects.equals(path, other.path)) {
             return false;
         }
-        if (rangeStatements == null) {
-            if (other.rangeStatements != null) {
-                return false;
-            }
-        } else if (!rangeStatements.equals(other.rangeStatements)) {
+        if (!Objects.equals(rangeStatements, other.rangeStatements)) {
             return false;
         }
-        if (units == null) {
-            if (other.units != null) {
-                return false;
-            }
-        } else if (!units.equals(other.units)) {
+        if (!Objects.equals(units, other.units)) {
             return false;
         }
         return true;