This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I was wondering as why javax.persistence.Query class throws NoResultException on calling getSingleResult() or getResultList() when there is no results? Won't it be more logical if they return 'null'? Also, rather than making NoResultException to be caught mandatory, they have made it a runtime exception. Since it is very common for a query to return no results, this should have been made a mandatory exception, if at all they are going to throw it.