-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Done
-
Affects Version/s: 1.6.0
-
Fix Version/s: 1.6.0
-
Component/s: None
-
Labels:
-
Environment:
ONOS
-
Story Points:3
1) Hyphen at all places must be made underscore in enum attribute.
2) Constructor of enum class must have the same name as enum attribute defined in java file.
public enum OperStatusEnum {
/**
- Represents up.
*/
UP(1),
/**
- Represents down.
*/
DOWN(2),
/**
- Represents testing.
*/
TESTING(3),
/**
- Represents unknown.
*/
UNKNOWN(4),
/**
- Represents dormant.
*/
DORMANT(5),
/**
- Represents notPresent.
*/
NOTPRESENT(6),
/**
- Represents lowerLayerDown.
*/
LOWERLAYER_DOWN(7);
private int operStatusEnum;
/**
- Creates an instance of operStatusEnum.
* - @param value value of operStatusEnum
*/
OperStatusEnum(int value) { operStatusEnum = value; }public static OperStatusEnum of(int value)
Unknown macro: { switch (value) { case 1: return OperStatusEnum.UP; case 2: return OperStatusEnum.DOWN; case 3: return OperStatusEnum.TESTING; case 4: return OperStatusEnum.UNKNOWN; case 5: return OperStatusEnum.DORMANT; case 6: return OperStatusEnum.NOT-PRESENT; case 7: return OperStatusEnum.LOWER-LAYER-DOWN; default : return null; } }
# | Subject | Branch | Project | Status | CR | V |
---|---|---|---|---|---|---|
9383,24 | [ONOS-4547, ONOS-4566, ONOS-4575, ONOS-4582, ONOS-4581, ONOS-4600, ONOS-4598, ONOS-4607, ONOS-4610, ONOS-4611] Prefix addition from config and defect fixes. | master | onos | Status: MERGED | +2 | +1 |