open-location-code icon indicating copy to clipboard operation
open-location-code copied to clipboard

Fix duplicate toUpperCase() calls, use Locale.ROOT

Open nyurik opened this issue 7 years ago • 11 comments

nyurik avatar Apr 28 '18 22:04 nyurik

@SuperSuz what do you mean? Your comment is a bit confusing :)

nyurik avatar Apr 29 '18 00:04 nyurik

@shoeper I am not able to merge the changes in this repo. Either you can set up so that I can self-merge after approvals, or you need to merge it yourself. Thx!

P.S. I think all toUpperCase() should be changed to toUpperCase(Locale.ROOT) because some tools may complain about locale ambiguity (even though in this case it shouldn't matter, ROOT makes it clear)

nyurik avatar Apr 29 '18 17:04 nyurik

@SuperSuz or @shoeper - are there any other people that need to review this code, or can you merge it? Thx!

nyurik avatar May 05 '18 03:05 nyurik

Sorry, I don't really know.

I cannot merge it.

shoeper avatar May 05 '18 09:05 shoeper

Looking at commit history, @drinckes and @JonMcPherson merged things recently.

nyurik avatar May 05 '18 14:05 nyurik

Also, @drinckes is who you want for merging

JonMcPherson avatar May 05 '18 23:05 JonMcPherson

Maybe @zongweil can help.

shoeper avatar May 29 '18 08:05 shoeper

I'll take a look within the next couple days.

zongweil avatar May 29 '18 17:05 zongweil

@zongweil I merged the code and applied your suggestion. See 92e2e40

nyurik avatar May 21 '21 20:05 nyurik

I have done another pass at minor optimizations -- the code now has a toValidCode which returns normalized code or null if it fails. This way constructor can use it directly, without doing duplicate toUpperCase.

nyurik avatar May 21 '21 20:05 nyurik