Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5865

@TransformedBy on setters can cause the transformer to be used for all instances of the type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Neutral
    • None
    • None
    • None

    Description

      When doing the following:

      class FooBar {
        @TransformedBy(MyTransformer.class)
        void setBaz(Command c) {}
      }
      

      One would expect that MyTransformer is only used when setting the Command instance on FooBar's Baz property. However, the unit test committed with this ticket id reveals that it is set globally, for all instances of Command

      ... in tur, this also means that setter-based transformers are only taken into account if the setter in question is the first where Node2Bean encounters the type in question (it's otherwise using a cached TypeDescriptor)

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD