Community
Participate
Working Groups
If, in an instance method, I assign the reference "this" to some value (including null) I receive no error (nor the compiler neither during the execution) and this assignation seems to have no effect. "this" is a final variable and its value may not be changed. In the debugger the line(s) seems to be skipped (no breakpoint possible). Example : public void f() { this=null; // Suicide accepted this=new ... // Also accepted ... }
This is fixed in the 3.0 stream. ---------- 1. ERROR in e:\temp\A.java (at line 3) this=null; // Suicide accepted ^^^^ The left-hand side of an assignment must be a variable
This is also fixed using the latest 2.1.3 build. See 2.1.3 Stream Maintenance Build M20040122 Thu, 22 Jan 2004 -- 08:00 (-0500) on the download page.
*** This bug has been marked as a duplicate of 46918 ***