Do not rebox pathId 67/78567/3
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 6 Dec 2018 17:30:14 +0000 (18:30 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 10 Dec 2018 15:41:32 +0000 (15:41 +0000)
Path IDs are stored in boxed array, using a long temporary forces
it to be unboxed, only to be boxed again when we put it into the
list.

Change-Id: I591f1259c61a0bc2c4a410af3810222b4fe7dc87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8f4ca9f10562f34e496a32e432d4217f9130a2a8)

bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/impl/add/AddPathAbstractRouteEntry.java

index 17e4aec849557e7b00645501e2b21a0fe2f81368..d02cf5266e48dbd5a3765aa1ab0b9a7f8c07e6d5 100644 (file)
@@ -90,7 +90,7 @@ public abstract class AddPathAbstractRouteEntry<C extends Routes & DataObject &
     public final boolean removeRoute(final UnsignedInteger routerId, final long remotePathId) {
         final RouteKey key = new RouteKey(routerId, remotePathId);
         final int offset = getOffsets().offsetOf(key);
-        final long pathId = this.offsets.getValue(this.pathsId, offset);
+        final Long pathId = this.offsets.getValue(this.pathsId, offset);
         this.values = this.offsets.removeValue(this.values, offset, (R[]) EMPTY_VALUES);
         this.pathsId = this.offsets.removeValue(this.pathsId, offset, EMPTY_PATHS_ID);
         this.offsets = this.offsets.without(key);