-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.0
-
generic
-
generic
Name: igT44549 Date: 02/08/99
When attempting to throw an exception that is a protected inner
class from a subclass of the outer class generates a confusing
error:
jx4\net\NetworkManager.java:119: No constructor matching
Service. ShutdownRequiredException(jx4.net.NetworkManager) found
in inner class jx4.sys.Service. ShutdownRequiredException.
throw new ShutdownRequiredException();
^
1 error
Note that this is probably also the case when instantiating
a protected inner class in the same conditions.
Example:
package foo;
public class OuterClass
{
protected class InnerException extends Exception
{
}
}
package bar;
import foo.*;
public class OtherOuterClass extends OuterClass
{
public void doSomething()
{
throw new InnerException();
}
}
would generate an error like:
bar\OtherOuterClass.java:123: No constructor matching
OuterClass. InnerException(bar.OtherOuterClass) found
in inner class foo.OuterClass. InnerException.
throw new InnerExceptionException();
^
1 error
(Review ID: 48516)
======================================================================