Do not rebox pathId 10/78510/6
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 6 Dec 2018 17:30:14 +0000 (18:30 +0100)
committerClaudio David Gasparini <claudio.gasparini@pantheon.tech>
Fri, 7 Dec 2018 06:05:31 +0000 (06:05 +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>
bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/impl/add/AddPathAbstractRouteEntry.java

index 4eb99ba5c51920dc6f725533b6aa508c8672b395..5c6b7cf7e9284242c1902f9696fad1ffaf27d8df 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);