Closed Aloren closed 5 years ago
Use withInitial methods added in Java 1.8
withInitial
I'm inclined to keep the original code. The new code may have a cleaner syntax, but it does have an overhead (albeit very minor) of an extra method call (supplier.get() in SuppliedThreadLocal.initialValue()).
Use
withInitial
methods added in Java 1.8