views:

414

answers:

2

Is there (not NotImplementedException, not supported).

+14  A: 

java.lang.UnsupportedOperationException

Or, if you use Apache Commons Lang and the operation should be supported, but has not been implemented (yet?):

org.apache.commons.lang.NotImplementedException

Thilo
Great. Now all that remains is that this will be the #1 Google result for "notsupportedexception java"
ripper234
Not implement is exactly not what I wanted btw, I want an exception that explicitly states I never intend to implement this method.
ripper234
Not unlikely, Google is very good to Stackoverflow.
Thilo
We've got Jon Skeet on our side for that one.
Matthew Scharley
For me it is hit number eight now: http://www.google.co.jp/search?q=notsupportedexception+java
Thilo
Just so you guys know, I just googled "java NotSupportedException" and this turns up #1
chakrit
A: 

You can use either UnsupportedOperationException or NoSuchMethodException or extend the Exception class and create your own custom exception called NotImplementedException or whatever

NoSuchMethodException should really only be used in cases involving reflection, which you are using Method.invoke(...).
William Brendel
Agreed i did mention subclassing...