You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@causeway.apache.org by "Andi Huber (Jira)" <ji...@apache.org> on 2023/05/06 06:28:00 UTC

[jira] [Assigned] (CAUSEWAY-3331) [Validation] Add a MM validation for number of parameters in supporting methods, eg choices5Act()

     [ https://issues.apache.org/jira/browse/CAUSEWAY-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andi Huber reassigned CAUSEWAY-3331:
------------------------------------

    Assignee: Andi Huber

> [Validation] Add a MM validation for number of parameters in supporting methods, eg choices5Act()
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAUSEWAY-3331
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3331
>             Project: Causeway
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M9
>            Reporter: Daniel Keir Haywood
>            Assignee: Andi Huber
>            Priority: Major
>             Fix For: 2.0.0-RC2
>
>
> In converting v1 to v2, we came across a supporting "choices" method that was incorrectly accepted in v1, but rejected in v2 as being orphaned.
> ```
> public Foo myAction(X x, Y y, Z z, W w) \{ ... }
> public List<Z> choices2(X x, Y y, Z z, W w) \{ ... }
> ```
> The error was that the choices method incorrectly included parameters AFTER the 'Nth' parameter, in other words it should have been:
> ```
> public List<Z> choices2(X x, Y y) \{ ... }
> ```
> It would be preferable if a MM validation (with higher priority than the one that triggered) could have given a message something like:
> "there should only be 2 parameters in "choices2(...)", instead found 4."
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)