Why does Android Lint warn about String.format using default locale when explicitly using Locale.US?

后端 未结 4 1194
感动是毒
感动是毒 2021-02-03 16:54

I originally called String.format this way:

return String.format(\"%s %f %f\", anotherString, doubleA, doubleB);

Which made Androi

4条回答
  •  情歌与酒
    2021-02-03 17:31

    when I mentioned the locale with the format, the lint warning just vanished.

    String.format(Locale.US,"%02d", selectedInt);

提交回复
热议问题