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> {
// parse group id
int groupIdInt = nullIsIllegal(json.get(GROUP_ID),
GROUP_ID + MISSING_MEMBER_MESSAGE).asInt();
GroupId groupId = new DefaultGroupId((short) groupIdInt);
GroupId groupId = new DefaultGroupId(groupIdInt);
// parse group key (appCookie)
String groupKeyStr = nullIsIllegal(json.get(APP_COOKIE),
......