JDK-4106051 : Class literals do not follow correct access rights
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.1.5,1.1.7,1.2.0
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_nt
  • CPU: generic,x86
  • Submitted: 1998-01-22
  • Updated: 1999-01-15
  • Resolved: 1999-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.2.0 1.2beta3Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
In the most recent build of JDK 1.2 beta3, javac generates class literals
that refer to private static fields of a parent class. This becomes an
issue as we turn on the strict VM checking in JDK beta3.

The following program breaks:

public class Bar {

    public static void main(String[] args) throws Exception
    {
        java.rmi.server.RMIClassLoader.loadClass("sun.rmi.server.ActivationGroup
Impl");
    }
} 

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: 1.2beta3 INTEGRATED IN: 1.2beta3
14-06-2004

WORK AROUND For now, you can work around the problem by rebuilding the build/<platform>/java/jvm directory: On Solaris: gnumake OTHER_CFLAGS=-DBROKEN_JAVAC On Win32: nmake EXTRA_CDEBUG=-DBROKEN_JAVAC
11-06-2004

EVALUATION When generating the class literal caches and the "helper" method (see javac/FieldExpression.java), the code checks if one has already been defined, and uses the existing one if present. This code incorrectly considers inherited definitions as well. The attempt to access the inherited members fail when the superclass from which they were inherited is in another package, as they are declared with default access. william.maddox@Eng 1998-01-22
22-01-1998