Select copyPolicy for each StatementSupport class
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / notification / AbstractNotificationStatementSupport.java
index 54c321d31856f30f7d682edc10ff4aa0f9ed6246..b57746b3134ed6a1c4c997b14f7c68183c846356 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 abstract class AbstractNotificationStatementSupport
         extends BaseSchemaTreeStatementSupport<NotificationStatement, NotificationEffectiveStatement> {
     AbstractNotificationStatementSupport() {
-        super(YangStmtMapping.NOTIFICATION);
+        super(YangStmtMapping.NOTIFICATION, CopyPolicy.DECLARED_COPY);
     }
 
     @Override
@@ -44,9 +44,9 @@ abstract class AbstractNotificationStatementSupport
 
         try {
             return new NotificationEffectiveStatementImpl(stmt.declared(), substatements,
-                historyAndStatusFlags(stmt.history(), substatements), stmt.getSchemaPath());
+                historyAndStatusFlags(stmt.history(), substatements), stmt.wrapSchemaPath());
         } catch (SubstatementIndexingException e) {
-            throw new SourceException(e.getMessage(), stmt.sourceReference(), e);
+            throw new SourceException(e.getMessage(), stmt, e);
         }
     }