I do not have a lot of experience in Java and I have not used java.util.Optional map function in production code. However, I need to use it for implementing a use case and the first thought which came to my mind, is this thread-safe ? As long as the mapping function in the argument is thread-safe, can we assume the overall operation will be thread safe ? How can I test this ?
I appreciate the help.
Thank you.