spring-projects / spring-webflow

Spring Web Flow
https://spring.io/projects/spring-webflow
Apache License 2.0
324 stars 228 forks source link

Running with Framework 6.2.0-SNAPSHOT gives NoSuchMethodException for parameterless action #1802

Open transentia opened 3 months ago

transentia commented 3 months ago

Long-established app. uses Webflow 3.0.0. Thought I'd try the upgrade to Framework 6.2.0-SNAPSHOT...see what breaks.

This code broke:

public class ExistingReportActions extends FormAction {
    ...

    public Event evaluateExistingReport() {
        ...
    }

Rectified by supplying the 'missing' RequestContext parameter explicitly:

public class ExistingReportActions extends FormAction {
    ...

    public Event evaluateExistingReport(RequestContext requestContext) {
        ...
    }

The flow xml remains as:

    <!-- *** existingReport MUST BE THE FIRST STATE in the flow *** -->
    <action-state id="existingReport">
        <evaluate expression="existingReportActions.evaluateExistingReport"/>
        ....
    </action-state>

Eliding the RequestContext parameter used to be allowable. It appears that it no longer is.

A fairly trivial difference, but a breaking one nonetheless.

rstoyanchev commented 3 months ago

Thanks for the report. Could you extract a small reproducer?