StepCreator doesn't support method generics parameters

Description

The issue is described here :
http://www.mail-archive.com/dev@jbehave.codehaus.org/msg09141.html

There is an example project attached

Description
The scenario fails because
"org.jbehave.core.steps.ParameterConverters$ParameterConvertionFailed: No parameter converter for interface java.util.List'

If i debug, he passes through the StringListConverter, but in the accept method the type is not an instance of ParameterizedType, because in the StepCreator class you use method.getParameterTypes() that doesn't retrieve de generics but the Class type (so java.util.List)

Solution
StepCreator at line 805 :
https://github.com/jbehave/jbehave-core/blob/master/jbehave-core/src/main/java/org/jbehave/core/steps/StepCreator.java

Should be :
Type[] parameterTypes = method.getGenericParameterTypes();

And the Parameter class should receive a Type instead of a Class type

Assignee

Mauro Talevi

Reporter

Matthieu Mestrez

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure