Another round of checkstyle fixes
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / repo / SharedSchemaRepository.java
index 1ff9f32908b024bde6b770a08930190fc60eef0b..6c615b58a9414613e9fc7eac24ed92b13657ac04 100644 (file)
@@ -12,7 +12,7 @@ import com.google.common.base.Preconditions;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
-
+import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaContextFactory;
@@ -22,18 +22,17 @@ import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 import org.opendaylight.yangtools.yang.model.repo.util.AbstractSchemaRepository;
 
 /**
- * A {@link SchemaRepository} which allows sharing of {@link SchemaContext} as
- * long as their specification is the same.
+ * A {@link SchemaRepository} which allows sharing of {@link SchemaContext} as long as their specification is the same.
  *
- * Note: for current implementation, "same" means the same filter and the same
- * set of {@link SourceIdentifier}s.
+ * <p>
+ * Note: for current implementation, "same" means the same filter and the same set of {@link SourceIdentifier}s.
  */
 @Beta
 public final class SharedSchemaRepository extends AbstractSchemaRepository implements Identifiable<String> {
     private final LoadingCache<SchemaSourceFilter, SchemaContextFactory> cache =
             CacheBuilder.newBuilder().softValues().build(new CacheLoader<SchemaSourceFilter, SchemaContextFactory>() {
                 @Override
-                public SchemaContextFactory load(final SchemaSourceFilter key) {
+                public SchemaContextFactory load(@Nonnull final SchemaSourceFilter key) {
                     return new SharedSchemaContextFactory(SharedSchemaRepository.this, key);
                 }
             });
@@ -49,7 +48,7 @@ public final class SharedSchemaRepository extends AbstractSchemaRepository imple
     }
 
     @Override
-    public SchemaContextFactory createSchemaContextFactory(final SchemaSourceFilter filter) {
+    public SchemaContextFactory createSchemaContextFactory(@Nonnull final SchemaSourceFilter filter) {
         return cache.getUnchecked(filter);
     }