Chained builders not sending transformed models to next transforms

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 24
    • Affects Version/s: 23, 24
    • Component/s: core-libs

        In chained builders, we have code like `downstream.with` which should instead become `consumer.accept` so the builder's buffered model is sent to the andThen transforms.

        This is definitely a bug: currently, they are not only not sending the models to next transforms, but they also return the downstream instead of this builder for chaining. This is a violation of API specification too.

        Simple reproducer attached. The "methodB" does not appear in the console output but appears in the class printer output.

        A similar problems happens to BlockCodeBuilder writing bypassing downstream ChainedCodeBuilder, initially reported in JDK-8335642; that bug should be fixed in the same patch as all these bugs are of the same nature.

        And as a consequence, we can remove TransformingCodeBuilder in favor of ChainedCodeBuilder.

              Assignee:
              Chen Liang
              Reporter:
              Chen Liang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: