Carsten Ziegeler wrote:
Antonio Gallardo wrote:
Antonio Gallardo dijo:In general I'm +1 for such changes, but unfortunately these are incompatible
Hi:
I also have another question. We have some exceptions that are not being throw at all, but the method declare it. Sample at line 76:
Filling the missing link :(
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/xsp/ja
va/org/apache/cocoon/components/language/markup/Logicsheet.jav
a?annotate=1.3
over the code.The constructor does not throw any of the declared Exceptions.
Can we clean up this code? There are cca 150 similar places
changes! For example, if a client has a try/catch clause for such
an exception and you remove it from the list, then the client code
is not compilable anymore as the exception is not thrown inside
the block anymore.
So, I would say, let's leave them there (but I'm not opposed to remove them
:) ).
"Throws" declarations can be safely removed in the situation when method implements an interface. Interface will have exception declarations, and interface implementation might not have them if it does not need them.
In all other situations, Carsten is right - this might cause backward incompatibility. This is important for user-facing classes. Should we start marking classes as internal, like "<b>INTERNAL!!!</b>" in javadoc or some such?
Vadim
