JDK-4030356 : Source code can refer to synthetic names like "this$Foo".
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.1
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5
  • CPU: sparc
  • Submitted: 1997-02-05
  • Updated: 2000-01-10
  • Resolved: 2000-01-10
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Files like this should not compile, but they do:
	// this is JCK 1.1 test innr017b
	class HiddenFieldBug {
	    class Inner {
		Object x = this$HiddenFieldBug;
		// A similar problem exists with other synthesized names,
		// such as val$foo, access$2(), HiddenFieldBug$1$Local.
	    }
	}

Comments
PUBLIC COMMENTS Source code can refer to synthetic names like "this$Foo", which are an implementation detail supposedly inaccessible to programmers. Thus, files like this should not compile, but they do: <pre> class HiddenFieldBug { class Inner { Object x = this$HiddenFieldBug; // A similar problem exists with other synthesized names, // such as val$foo, access$2(), HiddenFieldBug$1$Local. } } </pre>
10-06-2004

EVALUATION This is being left in the database for future consideration, but won't be worked on any time soon. david.stoutamire@Eng 1997-09-03
03-09-1997