Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 98055 - [encapsulate field] Encapsulating parenthesized field assignment is not performed correctly
[encapsulate field] Encapsulating parenthesized field assignment is not perfo...
Product: java
Classification: Unclassified
Component: Refactoring
All All
: P3 (vote)
: 6.x
Assigned To: Jan Pokorsky
Depends on:
  Show dependency treegraph
Reported: 2007-03-16 03:33 UTC by kely_garcia
Modified: 2007-10-15 13:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description kely_garcia 2007-03-16 03:33:06 UTC
Build ID: 200609161800 (Netbeans 6.0 M3)

Steps To Reproduce:
Encapsulate field f on the following:
class A {
        int f;

        void m() {
                (f) = 0;

Yields the following refactored class:
class A {
        private int f;

        void m() {
                (f) = 0;

    public int getF() {
        return f;

    public void setF(int f) {
        this.f = f;

Note that field "f" inside method "m" was not encapsulated
Comment 1 Pavel Flaska 2007-03-23 09:04:11 UTC
Encapsulate field refactoring is not available in current builds. It has to be
brought back with fixes.
Comment 2 Jan Pokorsky 2007-10-15 13:16:08 UTC
Already implemented. Please try the latest daily build.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo