epugh commented on code in PR #2633:
URL: https://github.com/apache/solr/pull/2633#discussion_r1712657394


##########
solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java:
##########
@@ -395,12 +395,12 @@ protected Locale parseLocale(String language, String 
country, String variant) {
             "language is required if country or variant is specified");
       } else if (country == null && variant != null) {
         throw new IllegalArgumentException("To specify variant, country is 
required");
-      } else if (country != null && variant != null) {
-        return new Locale(language, country, variant);
-      } else if (country != null) {
-        return new Locale(language, country);
       } else {
-        return new Locale(language);
+        return new Locale.Builder()

Review Comment:
   this looks nicer!



##########
solr/CHANGES.txt:
##########
@@ -133,7 +133,7 @@ Dependency Upgrades
 
 Other Changes
 ---------------------
-(No changes)
+* SOLR-17399: Replace the use of the deprecated java.util.Locale constructor 
with Locale Builder API

Review Comment:
   I often just put the proposed changelog text in my PR, because I always end 
up with conflicts in this file ;-).  Then I make the change right at the very 
end!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to