if (locks.containsKey(recordNo) && locks.containsValue(lockLongCookie)) {
If recordNo=1 locked cookie=001
and recordNo=2 locked cookie=002
when invoke deleteRecord(1,002); then...
unlock(recNo, lockCookie);
I don't think it's a good way that invoke unlock in the deleteRecord method.
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
catch IOException and then just print the message, is it really OK?