Uploaded image for project: 'Identity Provider'
  1. Identity Provider
  2. IDP-1047

Create Annotation for constructor parameter names and ParameterNameDiscoverer to understand it

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.2.0
    • Fix Version/s: 4.0.0
    • Component/s: Configuration
    • Labels:
      None
    • Environment:

      Lets try get some more of this done in V3.4 and nail it properly (as much as is possible) in V4

    • Operating System:
      Multiple

      Description

      See http://shibboleth.net/pipermail/dev/2016-September/008570.html

      This is a cross project work item, starting in Java-support with an implementation in Spring-extensions and then a scattering of annotations across the entire stack.

      The problem is that given

      class wibble {
        public wibble(Object paramtre) {...}
      }
      

      we have made 'paramtre' part of the external API, becaause someone might have said c:paramtre="foo" in a bean file.

      If someone comes along and fixes the spelling thjen the bean file will stop working.

      The idea is to add an annotation (so that we know not to change it), but the geneous bit (thanks Marvin S Addison) is that if we implement a org.springframework.core.ParameterNameDiscoverer and inject it suitably we can automate the process, so ion the above example it would be

      
      

      class wibble {
      public wibble(@ParameterName(name="parameter" Object renamed)

      {...}

      }

      The parameter name is removed from the public contract (whilst the ParameterName becomes part of it).

      If this class inherited correctly we should be able to fall through into the default behavior - it would be nice to warn if we did do this for one of our classes.

      Of course the problem then becomes of what to annotate, I think we need to annotate every constructor with parameters in the api trees of the IdP. OpenSAML is harder since (AIUI) the api-impl split isn't nearly as clean. I'll be asking for Brent's help there.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rdw@iay.org.uk Rod Widdowson
              Reporter:
              rdw@iay.org.uk Rod Widdowson
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days, 4 hours
                  2d 4h
                  Remaining:
                  Time Spent - 2 hours, 20 minutes Remaining Estimate - 2 days, 1 hour, 40 minutes
                  2d 1h 40m
                  Logged:
                  Time Spent - 2 hours, 20 minutes Remaining Estimate - 2 days, 1 hour, 40 minutes
                  2h 20m