Remove a RecursiveObjectLeaker reference 46/95146/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 12 Feb 2021 20:15:20 +0000 (21:15 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 12 Feb 2021 20:30:13 +0000 (21:30 +0100)
Since we are not using ROL, we do not need to worry about cleaning
it up in the reactor.

JIRA: YANGTOOLS-1196
Change-Id: Iaa470a32d9ff02b611e5f9a0fc86648f30f61824
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-reactor/src/main/java/module-info.java
yang/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java

index f229031b57c265725faf987298b840e2b0ac5de5..829d5ef676ced2f0387ad8c845976bc430761632 100644 (file)
@@ -11,7 +11,6 @@ module org.opendaylight.yangtools.yang.parser.reactor {
     requires transitive org.opendaylight.yangtools.yang.parser.spi;
     requires org.opendaylight.yangtools.concepts;
     requires org.opendaylight.yangtools.yang.model.util;
-    requires org.opendaylight.yangtools.util;
     requires org.slf4j;
 
     // Annotations
index fbe10607f0a04a34d7a2104536b633f53ffab646..aca640a1a124d79eef3fd3f683778ebce449c278 100644 (file)
@@ -30,7 +30,6 @@ import java.util.Optional;
 import java.util.Set;
 import java.util.SortedMap;
 import org.eclipse.jdt.annotation.NonNull;
-import org.opendaylight.yangtools.util.RecursiveObjectLeaker;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.common.Revision;
@@ -277,18 +276,14 @@ final class BuildGlobalContext extends NamespaceStorageSupport implements Regist
         final List<DeclaredStatement<?>> rootStatements = new ArrayList<>(sources.size());
         final List<EffectiveStatement<?, ?>> rootEffectiveStatements = new ArrayList<>(sources.size());
 
-        try {
-            for (final SourceSpecificContext source : sources) {
-                final RootStatementContext<?, ?, ?> root = source.getRoot();
-                try {
-                    rootStatements.add(root.declared());
-                    rootEffectiveStatements.add(root.buildEffective());
-                } catch (final RuntimeException ex) {
-                    throw propagateException(source, ex);
-                }
+        for (final SourceSpecificContext source : sources) {
+            final RootStatementContext<?, ?, ?> root = source.getRoot();
+            try {
+                rootStatements.add(root.declared());
+                rootEffectiveStatements.add(root.buildEffective());
+            } catch (final RuntimeException ex) {
+                throw propagateException(source, ex);
             }
-        } finally {
-            RecursiveObjectLeaker.cleanup();
         }
 
         sealMutableStatements();