use diamond op.
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/b5acec20 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b5acec20 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b5acec20 Branch: refs/heads/master Commit: b5acec204b7c65c17a5c64ae2beafe71ee2a6a04 Parents: 49effbf Author: Hayri Cicek <ha...@kodnito.com> Authored: Fri Dec 7 23:52:41 2018 +0100 Committer: Hayri Cicek <ha...@kodnito.com> Committed: Fri Dec 7 23:52:41 2018 +0100 ---------------------------------------------------------------------- .../src/main/java/org/apache/openejb/loader/FileUtils.java | 4 ++-- .../src/main/java/org/apache/openejb/loader/Files.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/b5acec20/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java ---------------------------------------------------------------------- diff --git a/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java b/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java index b9ef77f..965af03 100644 --- a/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java +++ b/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java @@ -25,7 +25,7 @@ import java.util.concurrent.ThreadLocalRandom; @SuppressWarnings("PMD.OverrideBothEqualsAndHashcode") public class FileUtils { - private static final ThreadLocalRandom _random = ThreadLocalRandom.current(); + private static final ThreadLocalRandom RANDOM = ThreadLocalRandom.current(); private File home; @@ -166,7 +166,7 @@ public class FileUtils { public static File createTempDirectory(final String pathPrefix) throws IOException { for (int maxAttempts = 100; maxAttempts > 0; --maxAttempts) { - final String path = pathPrefix + _random.nextLong(); + final String path = pathPrefix + RANDOM.nextLong(); final File tmpDir = new File(path); if (!tmpDir.exists() && tmpDir.mkdirs()) { http://git-wip-us.apache.org/repos/asf/tomee/blob/b5acec20/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java ---------------------------------------------------------------------- diff --git a/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java b/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java index e622851..f19b1cb 100644 --- a/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java +++ b/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java @@ -357,7 +357,7 @@ public class Files { // Shutdown hook for recursive DELETE on tmp directories - static final List<String> DELETE = new ArrayList<String>(); + private static final List<String> DELETE = new ArrayList<>(); static { final ClassLoader loader = Thread.currentThread().getContextClassLoader();