Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-423

INI ReflectionBuilder should not wrap reference values

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: Configuration
    • Labels:
      None

      Description

      When injecting a property whose setter expects say a Set, special handling is performed (split string with comma and build a set before injection ; List, Map, byte[]... types are also handled with special code).
      But this is performed before references are resolved, thus this does not work if myUrlsSetRef is already a Set :
      obj.urlsSet = $myUrlsSetRef
      ReflectionBuilder.applyProperty() builds a Set containing a single element $myUrlsSetRef, then resolves $myUrlsSetRef : this wraps the referenced set into a new set with 1 element.

      Workaround : create a fake setter with Object argument type.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              momaison Maison
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: