Mercurial > hg > graal-compiler
changeset 14017:e34f406850e5
ThreadLocals should be final
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 25 Feb 2014 13:04:25 -0800 |
parents | 555867401850 |
children | f8639746e942 |
files | graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/DebugScope.java graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/TimerImpl.java graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionValue.java |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/DebugScope.java Tue Feb 25 09:49:47 2014 -0800 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/DebugScope.java Tue Feb 25 13:04:25 2014 -0800 @@ -87,10 +87,10 @@ } } - private static ThreadLocal<DebugScope> instanceTL = new ThreadLocal<>(); - private static ThreadLocal<DebugScope> lastClosedTL = new ThreadLocal<>(); - private static ThreadLocal<DebugConfig> configTL = new ThreadLocal<>(); - private static ThreadLocal<Throwable> lastExceptionThrownTL = new ThreadLocal<>(); + private static final ThreadLocal<DebugScope> instanceTL = new ThreadLocal<>(); + private static final ThreadLocal<DebugScope> lastClosedTL = new ThreadLocal<>(); + private static final ThreadLocal<DebugConfig> configTL = new ThreadLocal<>(); + private static final ThreadLocal<Throwable> lastExceptionThrownTL = new ThreadLocal<>(); private final DebugScope parent; private final DebugConfig parentConfig;
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/TimerImpl.java Tue Feb 25 09:49:47 2014 -0800 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/TimerImpl.java Tue Feb 25 13:04:25 2014 -0800 @@ -41,7 +41,7 @@ /** * Records the most recent active timer. */ - private static ThreadLocal<AbstractTimer> currentTimer = new ThreadLocal<>(); + private static final ThreadLocal<AbstractTimer> currentTimer = new ThreadLocal<>(); private final DebugValue flat;
--- a/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionValue.java Tue Feb 25 09:49:47 2014 -0800 +++ b/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionValue.java Tue Feb 25 13:04:25 2014 -0800 @@ -128,7 +128,7 @@ return new MultipleOverridesScope(current, map); } - private static ThreadLocal<OverrideScope> overrideScopes = new ThreadLocal<>(); + private static final ThreadLocal<OverrideScope> overrideScopes = new ThreadLocal<>(); /** * The raw option value.