Bug 29211 - Should check the visibility of the array type before accessing its length field
Summary: Should check the visibility of the array type before accessing its length field
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-09 10:40 EST by Olivier Thomann CLA
Modified: 2003-02-10 06:46 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2003-01-09 10:40:54 EST
Using 0107,

We don't report an error for the following source.
[package pkg;
public class A1 {
    public static A[] array;
    protected static class A {}
}]

[
class A {
    int i = pkg.A1.array.length;
}
]

1) Compile these two sources files.
2) We don't report any error.

javac 1.4.1 or jikes 1.18 report a visibility problem on pkg.A1.array.
Same problem with private access.
Comment 1 Philipe Mulet CLA 2003-01-10 05:55:52 EST
Fixed in latest, also added support for reporting visibility issue against 
receiver type.
Comment 2 David Audel CLA 2003-02-10 06:46:25 EST
Verified.