Switch position statement to use Uint32
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / type / BitsSpecificationEffectiveStatement.java
index 045b19b6c3af073ea4b1e64d2097c39b8fcc6e40..25aefb4a3ebe4405c4debe155037ffdeb79f26cd 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
 
 import com.google.common.annotations.VisibleForTesting;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.TypeEffectiveStatement;
@@ -23,11 +23,11 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 
 @VisibleForTesting
-// FIXME: hide this class
+// FIXME: 5.0.0: hide this class
 public final class BitsSpecificationEffectiveStatement extends
         DeclaredEffectiveStatementBase<String, BitsSpecification> implements TypeEffectiveStatement<BitsSpecification> {
 
-    private final BitsTypeDefinition typeDefinition;
+    private final @NonNull BitsTypeDefinition typeDefinition;
 
     BitsSpecificationEffectiveStatement(
             final StmtContext<String, BitsSpecification, EffectiveStatement<String, BitsSpecification>> ctx) {
@@ -49,7 +49,7 @@ public final class BitsSpecificationEffectiveStatement extends
                         effectivePos = 0L;
                     }
                 } else {
-                    effectivePos = bitSubStmt.getDeclaredPosition();
+                    effectivePos = bitSubStmt.getDeclaredPosition().toJava();
                 }
 
                 final Bit bit = EffectiveTypeUtil.buildBit(bitSubStmt, effectivePos);
@@ -70,7 +70,6 @@ public final class BitsSpecificationEffectiveStatement extends
         typeDefinition = builder.build();
     }
 
-    @Nonnull
     @Override
     public BitsTypeDefinition getTypeDefinition() {
         return typeDefinition;