Hi guys.
What should happen if someone tries to lock a locked record or unlock an unlocked record?
Well, as for locking a locked record that's simple. Just wait till a record is available.
What for a second part of my question?
I see two possible outcomes but I can't decide which is better.
(1) do nothing, because we want a record to be unlocked and it is unlocked so "mission acomplished
"
(2) throw
IllegalStateException because trying to unlock already unlocked record is a wrong API usage.
Any suggestions?