Files
openide/java/java-impl/resources/inspectionDescriptions/SimpleDateFormatWithoutLocale.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

14 lines
546 B
HTML

<html>
<body>
Reports instantiations of <code>java.util.SimpleDateFormat</code> or <code>java.time.format.DateTimeFormatter</code>
that do not specify a <code>java.util.Locale</code>.
These calls will use the platform default locale, which depends on the OS settings.
This can lead to surprising behaviour when the code is run on a different platform or the OS settings are changed.
<p><code>Example:</code></p>
<pre><code>
new SimpleDateFormat("yyyy");
DateTimeFormatter.ofPattern("d/M/y");
</code></pre>
<!-- tooltip end -->
</body>
</html>