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 255217 - Generate getter / setter for boolean field generate an isXxxxxx() method
Summary: Generate getter / setter for boolean field generate an isXxxxxx() method
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Beans (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-11 13:36 UTC by adanyc
Modified: 2015-09-12 18:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
print screen of bug (19.86 KB, image/jpeg)
2015-09-11 13:36 UTC, adanyc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adanyc 2015-09-11 13:36:00 UTC
Created attachment 156097 [details]
print screen of bug

For example, if we have a property in a class like this:

private boolean active;

1) right click.
2) insert code
3) generate getter and setter

public boolean isActive() {
   return active;
}

public void setActive(boolean active) {
    this.active = active;
}

I got an unexpected behavior isActive(), it shuld be getActive()
I hope you can fix it.
Thanks in advance.
Comment 1 Ralph Ruijs 2015-09-12 18:28:35 UTC
From the JavaBean spec.

8.3.2 Boolean properties
In addition, for boolean properties, we allow a getter method to match the pattern:
public boolean is<PropertyName>();


This can be configured in the formatting options.