spring-projects / spring-data-jpa

Simplifies the development of creating a JPA-based data access layer.
https://spring.io/projects/spring-data-jpa/
Apache License 2.0
2.93k stars 1.39k forks source link

Improved consistency in writing Util classes and removed raw types to make types more stable #3408

Closed ch4570 closed 2 months ago

ch4570 commented 3 months ago

Hello. I've been putting your Spring Data JPA to good use in my practice.

I've modified & improved the code of a few classes to create a PR and upload it. Below are the classes I worked on and the reasons for the changes.

The getJsqlCount and getJsqlLower methods are using ExpressionList as a raw type, but ExpressionList only allows classes that implement the Expression interface, and the withParameters method of Function class is only used by JsqlParserUtils, so we changed it to a type-safe code that uses Generic.

christophstrobl commented 2 months ago

Thank you @ch4570.

ch4570 commented 2 months ago

@christophstrobl Thank you for merging my PR. I'm wondering why I don't see any contributor indication when the code is merged into the main branch.

christophstrobl commented 2 months ago

@ch4570 Thank you for the contribution - I'm sorry about that. The email used does not seem to be linked to your account (like in this commit c872085d367f9f551a2478b4ae3bcb5c5e151ee1 from the original PR).

ch4570 commented 2 months ago

@christophstrobl I didn't realize I had a different username because I committed from work. I apologize for bothering you with this question.

Thank you for your kind response. I'll try to contribute more in the future. 🥇