JDK-6998063 : new Scope impl to fix Scope performance issues
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-11-06
  • Updated: 2013-04-26
  • Resolved: 2011-05-18
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.
JDK 7
7 b120Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
See 6460352, 6996626.   

The previous fix for 6460352 had issues that were not discovered by existing tests, and had to be reverted (6996626). 

The fix needs to be fixed and new tests provided.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/langtools/rev/9427a3c795fc
04-12-2010

EVALUATION The problem is caused by the handling of inner classes bring read into a package scope and then imported into an import scope. When a package scope is filled in, it lists class files and enters symbols by "guessing" the name of the class based on the filename. This is acceptable for all outer classes, but is not correct if the class is actually an inner class. i.e. p/A$B.class may either be a top level class A$B in package p, or an inner class B in p.A. This cannot be determined until the class file is actually read. When it is read, the names are fixed up in the package scope, BUT, the previous names in the package scope may have already been imported into an ImportScope. If the import scope contains both the package symbols and the class symbols (i.e import p.*; import p.A.*; )then we can have a situation where the same Symbol appears twice in the same ImportScope, under different names (i.e. A$B and B), which is a Bad Thing, which gets worse when you try and dble() the Scope. The fix is to move the test for these "bogus" entries from ImportScope.lookup to a separate method where it can be used by Scope.dble as well.
06-11-2010