Bug 5481: When condition of augment added in constraints of augment target
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / AugmentUtils.java
index 7c83a5f0281fb72e599ae5c56e8b010b778c7486..9bcedcb22ba870bcc39e483e09da1346247017fb 100644 (file)
@@ -155,10 +155,11 @@ public final class AugmentUtils {
         return false;
     }
 
-    private static final Set<Rfc6020Mapping> NOCOPY_DEV_SET = ImmutableSet.of(Rfc6020Mapping.USES);
+    private static final Set<Rfc6020Mapping> NOCOPY_DEF_SET = ImmutableSet.of(Rfc6020Mapping.USES, Rfc6020Mapping.WHEN,
+            Rfc6020Mapping.DESCRIPTION, Rfc6020Mapping.REFERENCE, Rfc6020Mapping.STATUS);
 
     public static boolean needToCopyByAugment(final StmtContext<?, ?, ?> stmtContext) {
-        return !NOCOPY_DEV_SET.contains(stmtContext.getPublicDefinition());
+        return !NOCOPY_DEF_SET.contains(stmtContext.getPublicDefinition());
     }
 
     private static final Set<Rfc6020Mapping> REUSED_DEF_SET = ImmutableSet.of(Rfc6020Mapping.TYPEDEF);