Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
2498
Description
YANG enumerations map to an enum, which has a forValue() method. This gets realized this way:
public enum BgpOrigin {
static java.util.Map<java.lang.Integer, BgpOrigin> valueMap;
static {
valueMap = new java.util.HashMap<>();
for (BgpOrigin enumItem : BgpOrigin.values())
}
public static BgpOrigin forValue(int valueArg)
{ return valueMap.get(valueArg); }}
There are multiple things wrong here:
- valueMap should be a proper constant
- valueMap has wrong name, should be all capitals
- valueMap should an ImmutableMap