| Author |
Removing RecordNotFoundException from subclass
|
Jonathan Elkharrat
Ranch Hand
Joined: Dec 31, 2008
Posts: 170
|
|
i think the RecordNotFoundException in the writing methods is not necessary and here's why:
since the lock method already check that the record exist, and the writing methods
make sure the record is locked, that mean one thing ---> the record exist!
just making a point..
|
SCJP 5, SCWCD 5, SCBCD 5
|
 |
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4352
|
|
But you are not the first one, that point is already made several times (I made the same remark more than 2 years ago, and not onlt for the write methods, but also for unlock-method )
|
SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
|
 |
Jonathan Elkharrat
Ranch Hand
Joined: Dec 31, 2008
Posts: 170
|
|
now that you mention it, it's quite contradictory to have a RecordNotFoundException in the unlock method.
suppose someone lock a record, delete it and then call the unlock.
i just found a bug in my code now thanks to you
|
 |
 |
|
|
subject: Removing RecordNotFoundException from subclass
|
|
|