Zsolt Haraszti

Remove groupId casting to short from rest handler

Problem: The decoder in GroupCodec (used by the REST layer) chopped the
upper 16 bit in caller-provided group IDs. Since group IDs are
inherently greater than 16-bit on any OFDPA-based device, the current
casting rendered the REST layer unusable for such devices.

Fix: removed casting, verified that all tests pass, and verified that I
can now create healthy group entries on OFDPA-based switches.

Change-Id: Ieb51071ff9b0d47f4ff1f90d80970b6c0df946b7
...@@ -113,7 +113,7 @@ public final class GroupCodec extends JsonCodec<Group> { ...@@ -113,7 +113,7 @@ public final class GroupCodec extends JsonCodec<Group> {
113 // parse group id 113 // parse group id
114 int groupIdInt = nullIsIllegal(json.get(GROUP_ID), 114 int groupIdInt = nullIsIllegal(json.get(GROUP_ID),
115 GROUP_ID + MISSING_MEMBER_MESSAGE).asInt(); 115 GROUP_ID + MISSING_MEMBER_MESSAGE).asInt();
116 - GroupId groupId = new DefaultGroupId((short) groupIdInt); 116 + GroupId groupId = new DefaultGroupId(groupIdInt);
117 117
118 // parse group key (appCookie) 118 // parse group key (appCookie)
119 String groupKeyStr = nullIsIllegal(json.get(APP_COOKIE), 119 String groupKeyStr = nullIsIllegal(json.get(APP_COOKIE),
......