This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 12952 - Fastjavac does not detect private access error!
Summary: Fastjavac does not detect private access error!
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: Ivan Bradac
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-18 10:21 UTC by sapex
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sapex 2001-06-18 10:21:45 UTC
I don't know which compiler is wrong, rules about inner classes are special.

Here is an example:

/**
 *  Compiles with fastjavac, not with javac (JDK 1.3.1) or jikes.
 */
public class CompilerBug5
{
    private class A
    {
        private void a()
        {
        }
    }
    
    private class B extends A
    {
        private void b()
        {
            a();
        }
    }
}
Comment 1 Svata Dedic 2001-06-18 11:21:07 UTC
Could you please post here build # of the fastjavac compiler (run it with
-version parameter)

The general rule about symbol accessibility is that access restriction don't
apply when both parties (the code which makes a reference and the symbol
referenced) are within the same top-level class.
In this case, another rule applies as well - private members names are _not
inherited_ at all to subtype namespace. So although B extends A, it does not
inherit the definition for a() from it.
Comment 2 sapex 2001-06-20 09:10:11 UTC
fastjavac: version 4.0, 04/05/01-17:54, build #525

I don't know which compiler is right, fastjavac or javac,
but it would be less confusing if they all apply the same rules.
Comment 3 Ivan Bradac 2001-08-22 11:19:44 UTC
Has been forwarded to the Sun's fastjavac team.
Comment 4 Ivan Bradac 2001-08-22 11:21:24 UTC
You may check the status of this bug at
http://developer.java.sun.com/developer/bugParade/bugs/4450312.html
Comment 5 Quality Engineering 2003-07-01 13:11:27 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 6 Quality Engineering 2003-07-01 13:14:54 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 7 Jan Chalupa 2003-10-30 12:06:54 UTC
A mistakenly closed RESOLVED LATER/REMIND issue. Reopening.
Comment 8 Jan Pokorsky 2003-12-05 10:57:13 UTC
Fastjavac is not supported anymore and since it is a close source there is no
reason to keep this as open issue.
Comment 9 Quality Engineering 2007-09-20 12:07:39 UTC
Reorganization of java component