Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Code in RMContextImpl is as under:
RMContextImpl.java
void setHAServiceState(HAServiceState haServiceState) { synchronized (haServiceState) { this.haServiceState = haServiceState; } } public HAServiceState getHAServiceState() { synchronized (haServiceState) { return haServiceState; } }
As can be seen above, in setHAServiceState, we are synchronizing on the passed haServiceState instead of haServiceState in RMContextImpl which will not lead to desired effect. This does not seem to be intentional.
We can use a RW lock or synchronize on some object here.