-
Bug
-
Resolution: Fixed
-
P5
-
11, 17, 21
Field 'sun.nio.ch.Invoker.myGroupAndInvokeCount' uses anonymous class which overrides 'initialValue' method. But vanilla ThreadLocal.initialValue does the same - just returns 'null'.
private static final ThreadLocal<GroupAndInvokeCount> myGroupAndInvokeCount =
new ThreadLocal<GroupAndInvokeCount>() {
@Override protected GroupAndInvokeCount initialValue() {
return null;
}
};
It means we can replace it with plain ThreadLocal constructor.
private static final ThreadLocal<GroupAndInvokeCount> myGroupAndInvokeCount =
new ThreadLocal<>();
private static final ThreadLocal<GroupAndInvokeCount> myGroupAndInvokeCount =
new ThreadLocal<GroupAndInvokeCount>() {
@Override protected GroupAndInvokeCount initialValue() {
return null;
}
};
It means we can replace it with plain ThreadLocal constructor.
private static final ThreadLocal<GroupAndInvokeCount> myGroupAndInvokeCount =
new ThreadLocal<>();