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

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Story Points:
      5

      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)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: