Stefano Cordio
Stefano Cordio
I propose to change the implementation at: https://github.com/junit-team/junit5/blob/4288cf1233b4af6002e922cb9ddd1b159fe2c9b3/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/DefaultArgumentConverter.java#L265 replacing `Locale::new` with [`Locale::forLanguageTag`](https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#forLanguageTag-java.lang.String-). Happy to work on it if accepted.
@marcphilipp yes, but only if they specify a country and/or variant in the string. They would be broken like the second test case you currently have in the codebase. However,...
Looking at Java 19, the [`Locale(String)`](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Locale.html#%3Cinit%3E(java.lang.String)) constructor has been deprecated together with the other constructors and `Locale::forLanguageTag` is one of the [suggested ways](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Locale.html#ObtainingLocale) to obtain a `Locale` object.
In case you prefer to keep the current behavior thus avoiding a breaking change, an alternative could be an opt-in argument converter like `@JavaTimeConversionPattern`. A few ideas about naming: *...
Thanks for the pointers, @Bukama! As far as I can see, JUnit Pioneer [favored the builder](https://github.com/junit-pioneer/junit-pioneer/blob/cdfa6789c1913ba8546f4f7be2d20b49362e62ce/src/main/java/org/junitpioneer/jupiter/DefaultLocaleExtension.java#L50-L54) only when the fine-grained parameters are specified, otherwise `Locale::forLanguageTag` is used. Do you see...
> In case you prefer to keep the current behavior thus avoiding a breaking change, an alternative could be an opt-in argument converter like `@JavaTimeConversionPattern`. > > A few ideas...
Hi @marcphilipp and @sbrannen, I was going to submit a feature request to JUnit Pioneer for a custom argument converter, but stopped because I'm guessing that having the behavior configurable...
@marcphilipp I guess you're referring to the values of the configuration property, right? If the change would be the one I mentioned at https://github.com/junit-team/junit5/issues/3141#issuecomment-1410675040, yes, "ISO 639" vs. "BCP 47"...
@marcphilipp if you don't have objections, I'll compose a PR in the next few days for this topic.
I suppose you're referring to JPQL, right @christophstrobl? I've just added the following to the reproducers: ```java @Query("SELECT b FROM Book b WHERE b.author.id = :authorId") List findAllByAuthorIdWithJPQL(@Param("authorId") Long authorId);...