Fix EnumEffectiveStatementImpl#getStatus() 69/29869/2
authorRobert Varga <rovarga@cisco.com>
Wed, 18 Nov 2015 16:27:54 +0000 (17:27 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 19 Nov 2015 13:10:05 +0000 (13:10 +0000)
Status should default to CURRENT, e.g. we should never report it as
null.

Change-Id: I5741e4f65c0c254239851c83d79f094c540abaa0
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/type/EnumEffectiveStatementImpl.java

index cae49ff3f5130702257827b622bd0827332e4dca..66847b6c542f7a7dfc78ec90af200ad0e5bd9149 100644 (file)
@@ -27,7 +27,7 @@ public class EnumEffectiveStatementImpl extends DeclaredEffectiveStatementBase<S
     private final SchemaPath path;
     private String description;
     private String reference;
-    private Status status;
+    private Status status = Status.CURRENT;
     private Integer value;
 
     public EnumEffectiveStatementImpl(final StmtContext<String, EnumStatement, ?> ctx) {