Community
Participate
Working Groups
There isn't any reason why the Refactor->Extract Constant can't be used for instance expressions as well as static expressions. An instance field declared as final is still a constant. Can the warning with 'cannot extract constant; non-static expression' be removed and changed to generation of a non-static final field? public class Example { public void examle() { this.toString(); // highlight 'this.toString()' and do a Refactor->Extract constant } }
Post 2.1
reopen
*** This bug has been marked as a duplicate of bug 52791 ***