BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / impl / YangParserListenerImpl.java
index 1e71e4d2c58a454ee610d62eb4bdf63d5abaa25c..ec5e1f1820aa1bf4b5d72249da782f2cf5ee322b 100644 (file)
@@ -21,7 +21,6 @@ import static org.opendaylight.yangtools.yang.parser.impl.ParserListenerUtils.pa
 import static org.opendaylight.yangtools.yang.parser.impl.ParserListenerUtils.parseUserOrdered;
 import static org.opendaylight.yangtools.yang.parser.impl.ParserListenerUtils.parseYinValue;
 import static org.opendaylight.yangtools.yang.parser.impl.ParserListenerUtils.stringFromNode;
-
 import com.google.common.base.Splitter;
 import com.google.common.base.Strings;
 import com.google.common.collect.Iterables;
@@ -103,6 +102,10 @@ import org.opendaylight.yangtools.yang.parser.util.YangParseException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
+ */
+@Deprecated
 public final class YangParserListenerImpl extends YangParserBaseListener {
     private static final Logger LOG = LoggerFactory.getLogger(YangParserListenerImpl.class);
     private static final Splitter SLASH_SPLITTER = Splitter.on('/').omitEmptyStrings();
@@ -138,10 +141,10 @@ public final class YangParserListenerImpl extends YangParserBaseListener {
      * the "BaseListener" aspect, which need not be exposed to the user. Maybe
      * factor out a base class into repo.spi?
      *
-     * @param namespaceContext
-     * @param sourcePath
-     * @param walker
-     * @param tree
+     * @param namespaceContext namespaceContext
+     * @param sourcePath sourcePath
+     * @param walker walker
+     * @param tree tree
      * @return new instance of YangParserListenerImpl
      */
     public static YangParserListenerImpl create(final Map<String, NavigableMap<Date, URI>> namespaceContext,
@@ -600,7 +603,7 @@ public final class YangParserListenerImpl extends YangParserBaseListener {
                     namespace = namespaces.get(revision);
                 }
 
-                final QNameModule mod = QNameModule.cachedReference(QNameModule.create(namespace, revision));
+                final QNameModule mod = QNameModule.create(namespace, revision).intern();
                 qname = QName.create(mod, name);
             }
         }