Introduce yangtools.binding.meta
[yangtools.git] / common / yang-common / src / main / java / org / opendaylight / yangtools / yang / common / ErrorTag.java
index 80de87215263a5d5556564059a84998b48afa902..1e20aaaf5ef499d74b10e80843a17edd321edcd2 100644 (file)
@@ -9,15 +9,16 @@ package org.opendaylight.yangtools.yang.common;
 
 import static java.util.Objects.requireNonNull;
 
+import java.io.Serial;
 import java.io.Serializable;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 
 /**
  * Extensible enumeration of {@code error-tag} values, as defined in
- * <a href="https://datatracker.ietf.org/doc/html/rfc6241#appendix-A">RFC6241</a>. These values are an extensible
- * enumeration, since YANG does not place restriction on possible values in
- * <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-3.9">RFC8040</a>.
+ * <a href="https://www.rfc-editor.org/rfc/rfc6241#appendix-A">RFC6241</a>. These values are an extensible enumeration,
+ * since YANG does not place restriction on possible values in
+ * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-3.9">RFC8040</a>.
  *
  * <p>
  * Error tag defines overall error semantics. Additional tag-specific information may be associated with a particular
@@ -77,7 +78,7 @@ public final class ErrorTag implements Serializable {
     public static final ErrorTag LOCK_DENIED = new ErrorTag("lock-denied");
     /**
      * {@code unknown-element} {@link ErrorTag}. Covers mechanics specified in
-     * <a href="https://datatracker.ietf.org/doc/html/rfc6241#page-80">RFC6241, Appendix A, last item</a>. Note the
+     * <a href="https://www.rfc-editor.org/rfc/rfc6241#page-80">RFC6241, Appendix A, last item</a>. Note the
      * specification expressly forbids reporting this tag for NETCONF clients older than {@code :base:1.1}.
      */
     public static final ErrorTag MALFORMED_MESSAGE = new ErrorTag("malformed-message");
@@ -154,6 +155,7 @@ public final class ErrorTag implements Serializable {
      */
     public static final ErrorTag UNKNOWN_NAMESPACE = new ErrorTag("unknown-namespace");
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
     private final String elementBody;
@@ -178,7 +180,7 @@ public final class ErrorTag implements Serializable {
 
     @Override
     public boolean equals(final @Nullable Object obj) {
-        return obj == this || obj instanceof ErrorTag && elementBody.equals(((ErrorTag) obj).elementBody);
+        return obj == this || obj instanceof ErrorTag other && elementBody.equals(other.elementBody);
     }
 
     @Override
@@ -186,6 +188,7 @@ public final class ErrorTag implements Serializable {
         return elementBody;
     }
 
+    @Serial
     Object writeReplace() {
         return new ETv1(this);
     }