cldr icon indicating copy to clipboard operation
cldr copied to clipboard

Google Java formatter, AOSP mode, width=160

Open hagbard opened this issue 5 years ago • 1 comments

Reformatting of CLDR code to show formatter differences. 100% automated.

hagbard avatar Dec 11 '20 15:12 hagbard

BTW, I like the ideal of isNonEmpty(...).

(Just wish Java had the interface flexibility that some other languages do, where you could pass in "any class with an isEmpty() method".)

Mark

On Tue, Dec 15, 2020 at 9:44 AM David Beaumont [email protected] wrote:

@hagbard commented on this pull request.

In tools/cldr-code/src/main/java/org/unicode/cldr/util/CLDRLocale.java https://github.com/unicode-org/cldr/pull/880#discussion_r543553361:

@@ -84,9 +84,7 @@ public String getDisplayName(CLDRLocale cldrLocale) { } else { sb.append("?"); }

  •        if ((s != null && !s.isEmpty()) ||
    
  •            (r != null && !r.isEmpty()) ||
    
  •            (v != null && !v.isEmpty())) {
    
  •        if ((s != null && !s.isEmpty()) || (r != null && !r.isEmpty()) || (v != null && !v.isEmpty())) {
    

That's fair. Though you could argue that a simple "isNonEmpty(s)" helper would be an even bigger improvement.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/unicode-org/cldr/pull/880#discussion_r543553361, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMH7AF65LBIVNEWLZZ3SU6OABANCNFSM4UWYW6FQ .

macchiati avatar Dec 19 '20 21:12 macchiati