Make deeper comparison for best path selection.
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / AbstractRouteEntry.java
index c92a78f220f65a2b37688003e3a1c71bdb6ba1c4..c38c4c64d91e729b61b10a1aac9abdbcb61003f5 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.protocol.bgp.rib.impl;
 
 import com.google.common.primitives.UnsignedInteger;
-import java.util.Objects;
 import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
@@ -87,8 +86,7 @@ abstract class AbstractRouteEntry {
 
         // Get the newly-selected best path.
         final BestPath newBestPath = selector.result();
-        // FIXME: run deeper comparison
-        final boolean ret = !Objects.equals(this.bestPath, newBestPath);
+        final boolean ret = !newBestPath.equals(this.bestPath);
         LOG.trace("Previous best {}, current best {}, result {}", this.bestPath, newBestPath, ret);
         this.bestPath = newBestPath;
         return ret;