mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
14 lines
546 B
HTML
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> |