We have 'when' explicitly excluded, hence we can never observe
it in validation. Eliminate this dead code.
Change-Id: I4a4fb4c1e2a3d888e02f2db0e49671993e2985ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2abe50d138ad54a0afe9f832cf4469b3cdf59bd8)
private static void validateNodeCanBeCopiedByAugment(final StmtContext<?, ?, ?> sourceCtx,
final StatementContextBase<?, ?, ?> targetCtx, final CopyType typeOfCopy,
final boolean skipCheckOfMandatoryNodes) {
-
- if (sourceCtx.producesDeclared(WhenStatement.class)) {
- return;
- }
-
if (!skipCheckOfMandatoryNodes && typeOfCopy == CopyType.ADDED_BY_AUGMENTATION
&& requireCheckOfMandatoryNodes(sourceCtx, targetCtx)) {
checkForMandatoryNodes(sourceCtx);