Hi,

This is a question more for my own education rather than it being an 'real'
issue...

Using Tapestry 4.0.1:

In one of our page superclasses  we define an abstract method that throws 2
exceptions, there are no associated properties within the .page and the
method isn't used as a listener, but rather implemented by subclasses.

protected abstract void saveDraft() throws IOException,
NoSuchContentException;

The problem appears to be that Tapestry/Hivemind expects to enhance/find an
implementation that matches this signature exactly - forcing the declaration
of checked exceptions by each implementing subclass even if they are not
thrown. If I instead define the method within an interface (which I don't
want due to visibility) then the same issue still occurs:

------------------
org.apache.hivemind.ApplicationRuntimeException

Error at context:/WEB-INF/CaseImageStudyData.page, line 7, column 74: Method
'protected abstract void
com.syndicom.scn.ui.pages.framework.BaseCasePage.saveDraft()
throws java.io.IOException,com.syndicom.core.content.NoSuchContentException'
(declared in class com.syndicom.scn.ui.pages.framework.BaseCasePage) has no
implementation in class com.syndicom.scn.ui.pages.CaseImageStudyData (or
enhanced subclass $CaseImageStudyData_47).
------------------

Is there any way to 'tone down' this behaviour - I could understand
enhancement/whatever occurring if the method was public and had the
potential to be used as a property... Could protected methods be excluded?

Declaring that the exceptions are actually thrown solves the problem, but
I'd rather avoid adding @SuppressWarnings("unused") if at all possible...

Thanks for any information!

Ash

Reply via email to