Add a ModuleAugmentGenerator FIXME 12/97912/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 15 Oct 2021 18:32:52 +0000 (20:32 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 15 Oct 2021 18:34:02 +0000 (20:34 +0200)
Since we will be dealing with getOriginal(), it seems we had some
dead code from conversion. This might prove useful in what we need
to achieve here.

JIRA: MDSAL-696
Change-Id: I8af7f2277f5adc9c08b304d4f8693fc43ece6778
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/ModuleAugmentGenerator.java

index 98d29adcca523256eaf5c9c7653cac04e5bdbad7..25658cf294ec1420f765340dabb64dcb55aaaef3 100644 (file)
@@ -23,17 +23,18 @@ final class ModuleAugmentGenerator extends AbstractAugmentGenerator {
     }
 
     void linkAugmentationTarget(final GeneratorContext context) {
-        // FIXME: we need two-step resolution here:
-
-//      if (targetSchemaNode instanceof DataSchemaNode && ((DataSchemaNode) targetSchemaNode).isAddedByUses()) {
-//          if (targetSchemaNode instanceof DerivableSchemaNode) {
-//              targetSchemaNode = ((DerivableSchemaNode) targetSchemaNode).getOriginal().orElse(null);
-//          }
-//          if (targetSchemaNode == null) {
-//              throw new IllegalStateException("Failed to find target node from grouping in augmentation " + augSchema
-//                  + " in module " + context.module().getName());
-//          }
-//      }
+        // FIXME: do we need two-step resolution here? we probably have solved this somehow, or it's part of...
+        // FIXME: MDSAL-696: this looks like the sort of check which should be involved in replacing getOriginal()
+        //
+        //      if (targetSchemaNode instanceof DataSchemaNode && ((DataSchemaNode) targetSchemaNode).isAddedByUses()) {
+        //          if (targetSchemaNode instanceof DerivableSchemaNode) {
+        //              targetSchemaNode = ((DerivableSchemaNode) targetSchemaNode).getOriginal().orElse(null);
+        //          }
+        //          if (targetSchemaNode == null) {
+        //              throw new IllegalStateException("Failed to find target node from grouping in augmentation "
+        //                  + augSchema + " in module " + context.module().getName());
+        //          }
+        //      }
 
         setTargetGenerator(context.resolveSchemaNode(statement().argument()));
     }