Is Joda-Time DateTimeFormatter class thread safe?

后端 未结 3 1988
青春惊慌失措
青春惊慌失措 2020-12-14 05:12

Is the Joda-Time DateTimeFormatter class thread safe? Once I get an instance from DateTimeFormat.forPattern, can its various parse methods be calle

3条回答
  •  情深已故
    2020-12-14 06:19

    Yes, it is:

    DateTimeFormat is thread-safe and immutable, and the formatters it returns are as well.

    and so is the Java 8 version

    Implementation Requirements: This class is immutable and thread-safe.

提交回复
热议问题