Use Objects.equals() in yang-model-util
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / RevisionAwareXPathImpl.java
index 18ba81332ceb2fdbfeac8a2f9d332e44178fb5b8..6d407f7bb08845111f88aaf11471825bf8685cae 100644 (file)
@@ -55,17 +55,7 @@ public class RevisionAwareXPathImpl implements RevisionAwareXPath {
             return false;
         }
         RevisionAwareXPathImpl other = (RevisionAwareXPathImpl) obj;
-        if (xpath == null) {
-            if (other.xpath != null) {
-                return false;
-            }
-        } else if (!xpath.equals(other.xpath)) {
-            return false;
-        }
-        if (absolute != other.absolute) {
-            return false;
-        }
-        return true;
+        return absolute == other.absolute && Objects.equals(xpath, other.xpath);
     }
 
     @Override