Polish "Add factory to create a NamedThreadLocal with an initial value"
See gh-24705
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -55,7 +55,8 @@ public class SimpleThreadScope implements Scope {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(SimpleThreadScope.class);
|
||||
|
||||
private final ThreadLocal<Map<String, Object>> threadScope = NamedThreadLocal.withInitial("SimpleThreadScope", HashMap::new);
|
||||
private final ThreadLocal<Map<String, Object>> threadScope = NamedThreadLocal.withInitial(
|
||||
"SimpleThreadScope", HashMap::new);
|
||||
|
||||
@Override
|
||||
public Object get(String name, ObjectFactory<?> objectFactory) {
|
||||
|
||||
Reference in New Issue
Block a user