Fix invalid enum definition error string
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / type / BitsTypeBuilder.java
index 362f2b8681cfa47d6e8e87a0fd8cde7073aa4a1c..5c301bdafd89aff59fc0b6eb21b300d274141c01 100644 (file)
@@ -43,8 +43,8 @@ public final class BitsTypeBuilder extends AbstractRestrictedTypeBuilder<BitsTyp
         for (Bit baseTypeBit : getBaseType().getBits()) {
             if (item.getName().equals(baseTypeBit.getName())) {
                 if (item.getPosition() != baseTypeBit.getPosition()) {
-                    throw new InvalidBitDefinitionException(item, "Position of bit '%s' must be the same as the " +
-                            "position of corresponding bit in the base bits type %s.", item.getName(),
+                    throw new InvalidBitDefinitionException(item, "Position of bit '%s' must be the same as the "
+                            "position of corresponding bit in the base bits type %s.", item.getName(),
                             getBaseType().getQName());
                 }
                 isASubsetOfBaseBits = true;
@@ -70,10 +70,7 @@ public final class BitsTypeBuilder extends AbstractRestrictedTypeBuilder<BitsTyp
             }
         }
 
-        if (getBaseType() == null) {
-            return new BaseBitsType(getPath(), getUnknownSchemaNodes(), positionMap.values());
-        } else {
-            return new RestrictedBitsType(getBaseType(), getPath(), getUnknownSchemaNodes(), positionMap.values());
-        }
+        return getBaseType() == null ? new BaseBitsType(getPath(), getUnknownSchemaNodes(), positionMap.values())
+                : new RestrictedBitsType(getBaseType(), getPath(), getUnknownSchemaNodes(), positionMap.values());
     }
 }