Findbugs for yang parser impl util 61/18561/2
authorDebalina Ghosh <debalina.ghosh@hp.com>
Fri, 17 Apr 2015 18:49:59 +0000 (11:49 -0700)
committerDebalina Ghosh <debalina.ghosh@hp.com>
Mon, 20 Apr 2015 18:40:22 +0000 (18:40 +0000)
Change-Id: I82f976de66bb3806f0f8d35ab77ca19cdad87b40
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangSourceContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangSourceContextResolver.java

index a0ddc56b0a99dd5b42cc8d44f9aac5702240d4f0..302d08b90911bfbc279e2c5e603385d7c5974bb2 100644 (file)
@@ -20,6 +20,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 import javax.annotation.concurrent.ThreadSafe;
 import org.opendaylight.yangtools.concepts.Delegator;
@@ -208,7 +209,7 @@ public class YangSourceContext implements AdvancedSchemaSourceProvider<InputStre
 
     private List<InputStream> getValidInputStreamsInternal() {
         assertNotClosed();
-        final HashSet<SourceIdentifier> sourcesToLoad = new HashSet<>();
+        final Set<SourceIdentifier> sourcesToLoad = new HashSet<>();
         sourcesToLoad.addAll(this.getValidSources());
         for (SourceIdentifier source : this.getValidSources()) {
             if (source.getRevision() != null) {
index a960a2f3783c28333d5ec04a2b08c1e2569501fb..4ce5fbda4955672c62ee00f611fbe492221680fe 100644 (file)
@@ -13,6 +13,7 @@ import com.google.common.collect.ImmutableMultimap;
 import com.google.common.collect.ImmutableSet;
 import java.io.InputStream;
 import java.util.HashMap;
+import java.util.Map;
 import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.ModuleImport;
@@ -92,7 +93,7 @@ public abstract class YangSourceContextResolver {
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(YangSourceContextResolver.class);
-    private final HashMap<SourceIdentifier, YangSourceContextResolver.ResolutionState> alreadyProcessed = new HashMap<>();
+    private final Map<SourceIdentifier, YangSourceContextResolver.ResolutionState> alreadyProcessed = new HashMap<>();
     private final ImmutableSet.Builder<SourceIdentifier> missingSources = ImmutableSet.builder();
     private final ImmutableMultimap.Builder<SourceIdentifier, ModuleImport> missingDependencies = ImmutableMultimap
             .builder();