Bug 6867: Extend yang statement parser to support different yang versions
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / reactor / NamespaceStorageSupport.java
index 0fe03bec79a97db2aa2a59bbd6da39dcc8fa292d..4c36df37062c192f7b2a50d714c0e9a382458d14 100644 (file)
@@ -68,7 +68,7 @@ abstract class NamespaceStorageSupport implements NamespaceStorageNode {
     @SuppressWarnings("unchecked")
     @Override
     public <K, V, N extends IdentifierNamespace<K, V>> V getFromLocalStorage(final Class<N> type, final K key) {
-        Map<K, V> localNamespace = (Map<K,V>) namespaces.get(type);
+        final Map<K, V> localNamespace = (Map<K,V>) namespaces.get(type);
 
         V potential = null;
         if (localNamespace != null) {
@@ -89,9 +89,9 @@ abstract class NamespaceStorageSupport implements NamespaceStorageNode {
             return null;
         }
 
-        Set<Entry<ModuleIdentifier, V>> entrySet = localNamespace.entrySet();
-        for (Entry<ModuleIdentifier, V> entry : entrySet) {
-            ModuleIdentifier moduleIdentifierInMap = entry.getKey();
+        final Set<Entry<ModuleIdentifier, V>> entrySet = localNamespace.entrySet();
+        for (final Entry<ModuleIdentifier, V> entry : entrySet) {
+            final ModuleIdentifier moduleIdentifierInMap = entry.getKey();
             if (moduleIdentifierInMap.getName().equals(key.getName())) {
                 return entry.getValue();
             }
@@ -103,7 +103,7 @@ abstract class NamespaceStorageSupport implements NamespaceStorageNode {
     @Override
     public <K, V, N extends IdentifierNamespace<K, V>> Map<K, V> getAllFromLocalStorage(final Class<N> type) {
         @SuppressWarnings("unchecked")
-        Map<K, V> localNamespace = (Map<K, V>) namespaces.get(type);
+        final Map<K, V> localNamespace = (Map<K, V>) namespaces.get(type);
         return localNamespace;
     }