Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Removing RecordNotFoundException from subclass

 
Jonathan Elkharrat
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Roel De Nijs
Sheriff
Posts: 10220
129
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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 )
 
Jonathan Elkharrat
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic