change the way ImmutableBiMap is created for subsequent expansion
Change-Id: I87d631513a8eb859d597e38c2be9c201b1546440
diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2DefaultInterpreter.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2DefaultInterpreter.java
index ee307b6..29e2a3a 100644
--- a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2DefaultInterpreter.java
+++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2DefaultInterpreter.java
@@ -56,11 +56,13 @@
private static final PiHeaderFieldId ETH_SRC_ID = PiHeaderFieldId.of("ethernet_t", "srcAddr");
private static final PiHeaderFieldId ETH_TYPE_ID = PiHeaderFieldId.of("ethernet_t", "etherType");
- private static final ImmutableBiMap<Criterion.Type, PiHeaderFieldId> CRITERION_MAP = ImmutableBiMap.of(
- Criterion.Type.IN_PORT, IN_PORT_ID,
- Criterion.Type.ETH_DST, ETH_DST_ID,
- Criterion.Type.ETH_SRC, ETH_SRC_ID,
- Criterion.Type.ETH_TYPE, ETH_TYPE_ID);
+ private static final ImmutableBiMap<Criterion.Type, PiHeaderFieldId> CRITERION_MAP =
+ new ImmutableBiMap.Builder<Criterion.Type, PiHeaderFieldId>()
+ .put(Criterion.Type.IN_PORT, IN_PORT_ID)
+ .put(Criterion.Type.ETH_DST, ETH_DST_ID)
+ .put(Criterion.Type.ETH_SRC, ETH_SRC_ID)
+ .put(Criterion.Type.ETH_TYPE, ETH_TYPE_ID)
+ .build();
private static final ImmutableBiMap<Integer, PiTableId> TABLE_MAP = ImmutableBiMap.of(
0, PiTableId.of(TABLE0));