BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / AugmentationSchemaImpl.java
index f91efd24f53eb5ac526e477380ccef9e7f9bfcf7..bada88e7860842e7d6e09fd8b3ef8983f7f3fe79 100644 (file)
@@ -8,13 +8,13 @@
 package org.opendaylight.yangtools.yang.parser.builder.impl;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-
 import com.google.common.base.Optional;
 import com.google.common.collect.ImmutableList;
 import java.net.URI;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 import org.opendaylight.yangtools.yang.model.api.NamespaceRevisionAware;
@@ -23,6 +23,10 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.parser.builder.util.AbstractDocumentedDataNodeContainer;
 
+/**
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
+ */
+@Deprecated
 final class AugmentationSchemaImpl extends AbstractDocumentedDataNodeContainer implements AugmentationSchema, NamespaceRevisionAware, Comparable<AugmentationSchemaImpl> {
     private final int order;
     private final SchemaPath targetPath;
@@ -77,8 +81,8 @@ final class AugmentationSchemaImpl extends AbstractDocumentedDataNodeContainer i
     public int hashCode() {
         final int prime = 17;
         int result = 1;
-        result = prime * result + ((targetPath == null) ? 0 : targetPath.hashCode());
-        result = prime * result + ((whenCondition == null) ? 0 : whenCondition.hashCode());
+        result = prime * result + Objects.hashCode(targetPath);
+        result = prime * result + Objects.hashCode(whenCondition);
         result = prime * result + getChildNodes().hashCode();
         return result;
     }
@@ -145,4 +149,4 @@ final class AugmentationSchemaImpl extends AbstractDocumentedDataNodeContainer i
         }
         return this.order - o.order;
     }
-}
\ No newline at end of file
+}