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

PaginationParameterCustomizer warm() is never called #2040

Closed
Randgalt opened this issue May 28, 2022 · 1 comment · Fixed by #2077
Closed

PaginationParameterCustomizer warm() is never called #2040

Randgalt opened this issue May 28, 2022 · 1 comment · Fixed by #2077

Comments

@Randgalt
Copy link
Contributor

I have a custom binding annotation ala:

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@SqlStatementCustomizingAnnotation(PaginationCustomizerFactory.class)
public @interface ApiBind
{
}

PaginationCustomizerFactory implements createForParameter and returns a SqlStatementParameterCustomizer. The warm() method of that parameter customizer is never called (apply() is correctly called however).

hgschmie added a commit to hgschmie/jdbi that referenced this issue Jul 25, 2022
Fixes jdbi#2040. This needs some discussion as this increases the number of
calls to the #createForParameter of all ParameterCustomizerFactory
implementations.

This is because warm()'ing the SqlStatementCustomizers will call this in
addition to the regular #apply() calls from the BoundStatementCustomizer
in the CustomizingStatementHandler.
hgschmie added a commit to hgschmie/jdbi that referenced this issue Jul 25, 2022
Fixes jdbi#2040. This needs some discussion as this increases the number of
calls to the #createForParameter of all ParameterCustomizerFactory
implementations.

This is because warm()'ing the SqlStatementCustomizers will call this in
addition to the regular #apply() calls from the BoundStatementCustomizer
in the CustomizingStatementHandler.
@hgschmie
Copy link
Contributor

hgschmie commented Aug 2, 2022

Thank you for reporting this issue. It will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants