We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 614f0ea commit aae1527Copy full SHA for aae1527
1 file changed
processor/src/test/java/org/mapstruct/ap/internal/util/StringsTest.java
@@ -157,13 +157,12 @@ public void decapitalizeTurkish() {
157
}
158
159
private static Locale getTurkeyLocale() {
160
- Locale[] availableLocales = Locale.getAvailableLocales();
161
- for ( Locale locale : availableLocales ) {
162
- if ( locale.getLanguage().equals( "tr" ) ) {
163
- return locale;
164
- }
+ Locale turkeyLocale = Locale.forLanguageTag( "tr" );
+
+ if ( turkeyLocale == null ) {
+ throw new IllegalStateException( "Can't find Turkey locale." );
165
166
- throw new IllegalStateException( "Can't find Turkey locale." );
167
168
+ return turkeyLocale;
+ }
169
0 commit comments