MCPcopy Create free account
hub / github.com/ReadyTalk/avian / get

Method get

classpath/java/lang/ThreadLocal.java:22–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 }
21
22 public T get() {
23 Map<ThreadLocal, Object> map = Thread.currentThread().locals();
24 Object o = map.get(this);
25 if (o == null) {
26 o = initialValue();
27 if (o == null) {
28 o = Null;
29 }
30 map.put(this, o);
31 }
32 if (o == Null) {
33 o = null;
34 }
35 return (T) o;
36 }
37
38 public void set(T value) {
39 Map<ThreadLocal, Object> map = Thread.currentThread().locals();

Callers

nothing calls this directly

Calls 5

currentThreadMethod · 0.95
initialValueMethod · 0.95
getMethod · 0.65
putMethod · 0.65
localsMethod · 0.45

Tested by

no test coverage detected