Craig Bryant 0ea1032d90 Use SimpleDateFormat in thread safe construct
This was seen in a monasca-api.log:

ERROR [2016-02-13 17:18:41,546] monasca.common.middleware.TokenExceptionHandler:
Http Client Exception java.lang.NumberFormatException:
multiple points com.google.common.util.concurrent.UncheckedExecutionException:
java.lang.NumberFormatException: multiple points

Search shows that this can be caused by using a SimpleDateFormat concurrently
in two or more threads. SimpleDataFormat is not Thread Safe.

Use ThreadLocal to access SimpleDateFormant safely

Change-Id: Id12e8da8acc8b8a36be2504b55a219eef7293d44
2016-02-14 12:12:36 -07:00
..
2015-09-28 13:22:33 +02:00