If the method LockInfo.hasLock() returns false, there is no lock on the document and the output of the other methods is irrelevant and unspecified.
Note that so called "optimistic locking" always happens automatically, next to this explicit locking facility.