dCache/dcache — pull request #807 by gbehrmann (2014-08-30 08:44:19+00:00)
Title: Avoid thread-unsafe use of SimpleDateFormatter

SimpleDateFormatter is not thread safe, yet there are places in which we
use it in multi-threaded environments - or potentially multi-threaded
environments. The standard approach is to use a thread local instance.

This patch converts the places I could find. In a few cases I conservatively
estimated that a formatter could possibly be used from multiple thread and
converted it even when maybe not strictly required.

The alternative would be to use Java 8's new date/time API, but since we
are refusing to use Java 8 we have to solve the problem in other ways.

Target: trunk
Request: 2.10
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
Require-notes: yes
Require-book: no
Acked-by: Paul Millar
Patch: https://rb.dcache.org/r/7219/
(cherry picked from commit a86a9763411fbe5f62a337b81108124e524f88b1)

Conflicts:
modules/dcache/src/main/java/org/dcache/services/billing/text/Indexer.java

(cherry picked from commit 0ff73d089abf209f7efe7c4c4bfef79f94d30ef7)

Conflicts:
modules/dcache/src/main/java/diskCacheV111/hsmControl/flush/HttpHsmFlushMgrEngineV1.java
modules/dcache/src/main/java/diskCacheV111/poolManager/HttpPoolMgrEngineV3.java
modules/dcache/src/main/java/diskCacheV111/poolManager/RequestContainerV5.java
modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java
modules/dcache/src/main/java/org/dcache/services/billing/text/Indexer.java

(cherry picked from commit 6a094e0fba4dd864fa5ac77d30eddc4e066c86ca)

Conflicts:
modules/common/src/main/java/org/dcache/util/NetLoggerBuilder.java
modules/dcache/src/main/java/org/dcache/services/billing/text/Indexer.java

(cherry picked from commit 387dd2ad10d001eb5069d88109f4bd954f9e7db1)

Conflicts:
modules/dcache/src/main/java/org/dcache/services/billing/text/Indexer.java
modules/srm/src/main/java/org/dcache/srm/request/RequestsPropertyStorage.java