Leo:

The error occurred when creating a class that extended
ExcaliburComponentManager - the derived class contained implementations of
the initalize or contextualize methods corresponding to the Initializable
and Contextualizable interfaces.  The compiler complained because my new
class was declaring the exceptions (I was including the respective throws
clause).  So, to be absolute correct - the compilation error was on my
class - not ExcaliburComponentManager.  However, the compilation error
arrived because ExcaliburComponentManager implementation doesn't declare the
respective exceptions.

What is interesting here is that ExcaliburComponentManager implements the
Initializable and Composable interfaces without declaring the required
exceptions and yet this compiles ok (which I confess I don't understand).

Cheers, Steve.


> -----Original Message-----
> From: Leo Sutic [mailto:[EMAIL PROTECTED]
> Sent: Friday, 07 December, 2001 16:25
> To: Avalon Developers List
> Subject: RE: ExcaliburComponentManager
>
>
>
>
> > From: Stephen McConnell [mailto:[EMAIL PROTECTED]
> >
> > ExcaliburComponentManager - some of the methods don't throw the
> exception
> > declared under their respective interfaces.
> >
> >   public void initialize( ) // doesn't throw Exception
> >   public void contextualize( final Context context ) // doesn't throw
> > ContextException
> >
> > These two omissions result in compilation errors under JDK1.4b3.
>
> Interesting. The Java Language Specification 8.4.4 specifies that a method
> that overrides an inherited method may not throw an exception that the
> overridden method does not throw, but does not require it to specify the
> same throws clause. Could you include the compilation errors?
>
> /LS
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to