I am reading through java codes to ensure it is thread safe.
As I understand, any local variables within the method is thread safe since it belongs to the stack memory address. Any class / instance variables is not thread safe as it belongs to the heap memory is shared by other thread.
By rule of thumb, I can put a synchronized keyword on every method which touches the class variables.
Is there any eclipse plugin, or rules I can analyze / prevent multi-threading issues?