Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Collection instead List for withPredicateVar/addPredicateVar #348

Closed
ChristianMattarVT opened this issue Aug 10, 2022 · 0 comments · Fixed by #357
Closed

Support Collection instead List for withPredicateVar/addPredicateVar #348

ChristianMattarVT opened this issue Aug 10, 2022 · 0 comments · Fixed by #357
Labels
enhancement New feature or request

Comments

@ChristianMattarVT
Copy link

Is your feature request related to a problem? Please describe.
The method addPredicateVar in the various request classes has 2 overloads: one that support List types, another one for everything else.
Last week, it happened to me that I passed a Collection type to addPredicateVar method. Unfortunately, this then links to the overloaded method
public XXX addPredicateVar(final String varName,
final TValue predicateVar)

which will just invoke toString on the collection, instead of adding a variable for each member of the collection.

Describe the solution you'd like
I suggest to change the template that generates the method
public XXXX addPredicateVar(final String varName,
final List predicateVar)

to

public <TValue> XXXX addPredicateVar(final String varName,
        final **Collection**<TValue> predicateVar)

instead. Same for the "withPredicateVar" method. It should be a backwards compatible change. I don't see any semantic requirement for only supporting Lists.

Thank you for your support!

@ChristianMattarVT ChristianMattarVT added the enhancement New feature or request label Aug 10, 2022
@jenschude jenschude mentioned this issue Oct 24, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant