Add CopyPolicy.REJECT
[yangtools.git] / yang / yang-parser-reactor / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / reactor / StatementContextBase.java
index a3f6ca286905459874d97b667fc8e1f9c31f4af0..880c7db3836450fc11547c4a2588f0876505567c 100644 (file)
@@ -775,6 +775,8 @@ public abstract class StatementContextBase<A, D extends DeclaredStatement<A>, E
                 return Optional.of(parent.childCopyOf(this, type, targetModule));
             case IGNORE:
                 return Optional.empty();
+            case REJECT:
+                throw new IllegalStateException("Statement " + support.getPublicView() + " should never be copied");
             default:
                 throw new IllegalStateException("Unhandled policy " + policy);
         }