X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-model-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Futil%2FAbstractUnsignedInteger.java;h=22f73fcfada4d155ab96be26091deac2961723a0;hb=d911236c08d1b2cba6d65d9954f3ab48cff5f61e;hp=d791c8870819184e2169f90c7b5343a5cecb1b80;hpb=aa0d59e9afecc484e8d0e219d3156e7817266e28;p=yangtools.git diff --git a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/AbstractUnsignedInteger.java b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/AbstractUnsignedInteger.java index d791c88708..22f73fcfad 100644 --- a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/AbstractUnsignedInteger.java +++ b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/AbstractUnsignedInteger.java @@ -33,7 +33,9 @@ import org.opendaylight.yangtools.yang.model.api.type.UnsignedIntegerTypeDefinit * inclusively. * * + * @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 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;