gcj/108: Compiler doesn't check access modifiers on interface implementations
bryce@albatross.co.nz
bryce@albatross.co.nz
Wed Nov 24 16:30:00 GMT 1999
>Number: 108
>Category: gcj
>Synopsis: Compiler doesn't check access modifiers on interface implementations
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 24 16:30:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Bryce McKinlay <bryce@albatross.co.nz>
>Release: 2.95.2
>Organization:
>Environment:
any
>Description:
Methods declared in interfaces may only be implemented by
public methods. gcj fails to check this at compile time,
and the following invalid code compiles:
>How-To-Repeat:
public interface I
{
void test();
}
public class Access implements I
{
public static void main(String args[])
{
I i = new Access();
i.test();
}
private void test() {}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list