I have a question concerning the java synchronization with static methods.
More precisely, I have a class with static methods that can be used concurrently by several threads. The principal static method of my class has one argument and calls the other auxiliary static methods one after the other passing them this argument.
My question is the following: since the class can be used by multiple threads at a time, isn't there a risk that another thread replaces the argument by another one?
I had thought of using a synchronization block on the argument variable of my principal function encompassing the whole code of the method (and thus the calls to auxiliary functions too), but I'm not sure it is a good solution.
Could anyone help me?