Prevent unnecessary boxing in AddPathBestPath 98/78498/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 6 Dec 2018 11:56:18 +0000 (12:56 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 6 Dec 2018 11:56:18 +0000 (12:56 +0100)
The callers are of two varieties: boxed and unboxed. Unboxing is
inherently faster, hence force the single boxed callsite to unbox
allowing us to convert it when needed.

Change-Id: Ie4d80398724b2f98a186e500c73e33ed1775a406
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/impl/add/AddPathBestPath.java

index 060fc37ffbf0b76883345c19be0c642da8f5ad1f..7fc2a411fa16be612c672f20244c9253d1263b30 100644 (file)
@@ -23,7 +23,7 @@ public final class AddPathBestPath extends AbstractBestPath {
     private final long pathId;
 
     public AddPathBestPath(@Nonnull final BestPathState state, @Nonnull final RouteKey key, final int offsetPosition,
-            final Long pathId) {
+            final long pathId) {
         super(state);
         this.routeKey = requireNonNull(key);
         this.offsetPosition = offsetPosition;