Pluto
  1. Pluto
  2. PLUTO-589

alter return types in org.apache.pluto.container.om.portlet.Filter?

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: portlet container
    • Labels:
      None

      Description

      The return type for the getInitParams() method in org.apache.pluto.container.om.portlet.Filter is List<? extends InitParam>.
      This presents an awkward scenario, one particularly present when creating unit tests for a FilterChain implementation and attempting to create mock Filter implementations.

      The requirement that getInitParams return a class that implements an interface that extends InitParam. You cannot simply return a class that implements InitParam; you would need to define your own custom interface that extends InitParam, and implement your custom interface.

      If the InitParam interface satisfactorily defines what's needed, the getInitParams return should be a class that simply implements InitParam.

      Is it possible to modify the return value for getInitParams to simply?
      List<InitParam>

      This also applies to the getDescriptions and getDisplayNames method in the same class; both have return values of List<? extends someinterface>, it should simply be List<interface>.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Nicholas Blair
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development