The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Exception-Handling Antipatterns
Subject:  Why we need NoSuchMethodException?
Date:  2006-04-10 07:53:47
From:  dspencer73
Response to: Why we need NoSuchMethodException?


You might not be ready to implement that method.

You might be implementing an interface with 5 methods, but want to run some test code on how you've implemented just three of them. But, before you can do that, you must implement the other two, at least trivially.

This is especially true on a large project where you are sharing the development effort with an entire team.

In these cases, it is better to throw an exception than stub out the method with a null return.

 Feed java.net RSS Feeds