It depends.
When you are writing the classes for objects that will be used from multiple threads, the whole game changes. You need to understand what results you are trying to achieve if you hope to provide any thread safety guarantees.
In this case, if this is the only method in your class, there is no point in synchronizing access to this method. But it won't be the only method - for it would make the class pretty pointless.
You only need to synchronize this method if you need to do so to make the class thread safe for other reasons - at which point, you might want to question whether the overhead of a ConcurrentHashMap
is worthwhile.