This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/108: Compiler doesn't check access modifiers on interface implementations
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/108: Compiler doesn't check access modifiers on interface implementations
- From: bryce at albatross dot co dot nz
- Date: 25 Nov 1999 00:22:10 -0000
- Reply-To: bryce at albatross dot co dot nz
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, bryce@albatross.co.nz
>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: