This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 119494 - Warning when generating only getter
Summary: Warning when generating only getter
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-19 15:33 UTC by Jiri Prox
Modified: 2010-09-23 08:39 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2007-10-19 15:33:15 UTC
Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710181000)
Java: 1.6.0_03-ea; Java HotSpot(TM) Client VM 1.6.0_03-ea-b01
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Show warning when user generate only getter and in the code there is also value assigned to this value.

Example:
public class TestClass {    
    public int x;   
}

public class TestClass2 extends TestClass{
    public void method() {
        x  = 3;
        System.out.println(x);
    }
}

Encapsulate field x - select only creating getter and change access modifier to private
-> the x will not be accessible in line x=3;