Bug 5449: Fix ClassCastException in BGP-LU 17/35617/2
authorMilos Fabian <milfabia@cisco.com>
Wed, 2 Mar 2016 16:31:06 +0000 (17:31 +0100)
committerMilos Fabian <milfabia@cisco.com>
Wed, 2 Mar 2016 16:38:19 +0000 (16:38 +0000)
Fix MPLS label value conversion from BI to BA.

Change-Id: Ief28ce287baac9432d61ab7860701917018c194b
Signed-off-by: Milos Fabian <milfabia@cisco.com>
bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LabeledUnicastRIBSupport.java

index 47c0a940838d79ac749afd42fab67ccca35b21d7..92982d7a212c40745ce8c6ac5409e87914012ea5 100644 (file)
@@ -249,7 +249,7 @@ final class LabeledUnicastRIBSupport extends AbstractRIBSupport {
             for(final UnkeyedListEntryNode label : ((UnkeyedListNode)labelStacks.get()).getValue()) {
                 final Optional<DataContainerChild<? extends PathArgument, ?>> labelStack = label.getChild(LV_NID);
                 if (labelStack.isPresent()) {
-                    labelStackbuilder.setLabelValue((MplsLabel) labelStack.get());
+                    labelStackbuilder.setLabelValue(new MplsLabel((Long) labelStack.get().getValue()));
                 }
             }
         }