Enforce checkstyle in yang-data-util
[yangtools.git] / yang / yang-data-util / src / main / java / org / opendaylight / yangtools / yang / data / util / LeafInterner.java
index 80cec0b2ef52493eac0cefdba713af82bdb45d2a..b270222c49292641118e5e73e43b1c4a16e78878 100644 (file)
@@ -26,10 +26,12 @@ import org.slf4j.LoggerFactory;
  * Utility class for sharing instances of {@link LeafNode}s which have low cardinality-- e.g. those which hold
  * boolean or enumeration values. Instances containing attributes are not interned.
  *
+ * <p>
  * Such objects have cardinality which is capped at the product of QNAMES * TYPE_CARDINALITY, where QNAMES is the total
  * number of different QNames where the type is used and TYPE_CARDINALITY is the number of possible values for the type.
  * Boolean has cardinality of 2, enumerations have cardinality equal to the number of enum statements.
  *
+ * <p>
  * The theory here is that we tend to have a large number (100K+) of entries in a few places, which could end up hogging
  * the heap retained via the DataTree with duplicate objects (same QName, same value, different object). Using this
  * utility, such objects will end up reusing the same object, preventing this overhead.
@@ -65,8 +67,8 @@ public final class LeafInterner {
     @Nonnull public static <T extends LeafNode<?>> Interner<T> forSchema(@Nullable final LeafSchemaNode schema) {
         if (schema != null) {
             final TypeDefinition<?> type = schema.getType();
-            if (type instanceof BooleanTypeDefinition || type instanceof EnumTypeDefinition ||
-                    type instanceof IdentityrefTypeDefinition) {
+            if (type instanceof BooleanTypeDefinition || type instanceof EnumTypeDefinition
+                    || type instanceof IdentityrefTypeDefinition) {
                 return LeafInterner::intern;
             }
         }