This is a dumb warning. If you look at the source code of the SimpleDateFormat constructor, it will get the default locale.
public SimpleDateFormat(String pattern) { this(pattern, Locale.getDefault()); }
Therefore, adding it to your code is redundant and overly detailed. Locale.getDefault () is almost always what you want, as that is what the user device is configured for. If for some reason you need to always return, for example, "Monday", no matter what user language is set, than you can specify Locale.US, but this seems like a rare situation.
The best thing to do is disable dumb inspection.
miguel Nov 12 '15 at 23:48 2015-11-12 23:48
source share