<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>keichanzahorumon0405</author_name>
  <author_url>https://blog.hatena.ne.jp/keichanzahorumon0405/</author_url>
  <blog_title>技術開発日記</blog_title>
  <blog_url>https://kechanzahorumon.hatenadiary.com/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>SimpleDateFormatは基本的には以下の様にクラス変数として宣言するものと思っていた。 毎回newするのも微妙だと思って。 private static final DateFormat df = new SimpleDateFormat(&quot;yyyy-MM-dd&quot;); public void func () { } ただ、このように実装してしまうとマルチスレッドの環境では正常に動作せず、バグの温床となるらしい。 そこで対応策として、SimpleDateFormatを使用する際はクラス変数にせず、毎回newするようにするのがベストとのこと。 public void func () { …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkechanzahorumon.hatenadiary.com%2Fentry%2F2012%2F08%2F24%2F162751&quot; title=&quot;SimpleDateFormatとマルチスレッド - 技術開発日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-08-24 16:27:51</published>
  <title>SimpleDateFormatとマルチスレッド</title>
  <type>rich</type>
  <url>https://kechanzahorumon.hatenadiary.com/entry/2012/08/24/162751</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
