From the course: Java 25 for Professionals with Jetbrains AI Assistant

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Challenge: Refactor to thread-safe code with ScopedValue

Challenge: Refactor to thread-safe code with ScopedValue - Java Tutorial

From the course: Java 25 for Professionals with Jetbrains AI Assistant

Challenge: Refactor to thread-safe code with ScopedValue

- [Instructor] All right, and here's your challenge. You're going to use ScopedValue. First you're given a class OrderService that's still using ThreadLocal. Your specific tasks are described at the bottom of this challenge.md file. And here's your starting point: the OrderService. It's currently using ThreadLocal, and you're going to update it to use ScopedValue. Good luck.

Contents