This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
my specification mandates to throw a RecordNotFoundException, if either the specified record cannot be found or has a deleted-flag.
Actually the assignment defines two different values for the short flag:
0x0000 = valid
0x0080 = deleted
What, if due to some mysterious failure to hard drive, the flag I receive turns out to be neither one of those specified?
Is it legal to also throw a RecordNotFoundException in this special case? Or does it have to be one of a different type to exactly match the specification? Or is it better to ignore this problem at all?