FIX: Protected Members Accessible to Subclass in Other Package (156912)
The information in this article applies to:
This article was previously published under Q156912 SYMPTOMS
The Java Language Compiler (jvc) incorrectly compiles code that violates
field visibility rules according to the Java specification. If a sub-
classed object (S) is derived from a base class (B) in another package that
has a protected member variable (ld) and class S tries to access a member
via a qualified name of Q.ld, access is permitted only if Q is S or a
subclass of S. If Q is the base class of S, then access should not be
permitted and an error should be generated. JVC compiles code that violates
this field visibility rule without generating any warnings or errors.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem has been fixed in
Visual J++ 1.1.
REFERENCES
For the latest Knowledge Base articles and other support information on
Visual J++ and the SDK for Java, see the following pages on the
Microsoft Technical Support site:
Modification Type: | Minor | Last Reviewed: | 8/25/2005 |
---|
Keywords: | kbBug kbCommandLine kbfix kbVJ110fix KB156912 |
---|
|