summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java b/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java
index 4421efd7f3..fab0dd102a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java
@@ -24,10 +24,10 @@ public class PerformanceLogContext {
private static final PerformanceLogContext INSTANCE = new PerformanceLogContext();
/** List that stores events as performance logs. */
- private final ThreadLocal<List<PerformanceLogRecord>> eventRecords = new ThreadLocal<>();
+ private static final ThreadLocal<List<PerformanceLogRecord>> eventRecords = ThreadLocal
+ .withInitial(ArrayList::new);
private PerformanceLogContext() {
- eventRecords.set(new ArrayList<>());
}
/**
@@ -62,6 +62,6 @@ public class PerformanceLogContext {
* Removes all of the existing records from the current list of events.
*/
public void cleanEvents() {
- eventRecords.get().clear();
+ eventRecords.remove();
}
} \ No newline at end of file