JBehave
  1. JBehave
  2. JBEHAVE-917

Use more flexible "Consumer extends" for list of step instances.

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.9
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In my project i want to pass a List of InjectableStep (which is a marker interface).
      But i cannot pass my List<? super InjectableStep> or even List to the constructor of InstanceStepsFactory. It always calls the Ctor with the Object... parameter till I use the workaround and cast my List to List. I don't think that someone will provide a step implementationclass which is derived from java.util.List so the downside of a cast needed in this rare situation is very small.

      See http://stackoverflow.com/a/252860/1325574 for further details of the "Producer Extends Consumer Super" idea.

      See also https://github.com/jbehave/jbehave-core/pull/47

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Fix Version/s 3.9 [ 19035 ]
        Priority Trivial [ 5 ] Minor [ 4 ]
        Hide
        Mauro Talevi added a comment -

        Applied suggested fix.

        Show
        Mauro Talevi added a comment - Applied suggested fix.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Sebastian Sickelmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: