Bug 160531 - Generating getters for a Boolean makes a getXxxx method instead of a isXxxx method
Generating getters for a Boolean makes a getXxxx method instead of a isXxxx m...
Status: RESOLVED WONTFIX
Product: java
Classification: Unclassified
Component: Hints
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Max Sauer
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-18 11:13 UTC by cbliard
Modified: 2009-07-03 12:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cbliard 2009-03-18 11:13:37 UTC
When asking NetBeans to generate getters for a boolean field foo, it kindly creates a method isFoo(). But if we want a
getter for the Boolean class, then the getter is named getFoo().

I expected the getter generator to make a isFoo() method for both boolean and Boolean types.
Comment 1 Vitezslav Stejskal 2009-03-20 10:39:07 UTC
Sounds reasonable to me.
Comment 2 Max Sauer 2009-03-27 09:45:30 UTC
Fixed.
---
http://hg.netbeans.org/jet-main/rev/bac1f4b232bf
Comment 3 Quality Engineering 2009-03-28 20:37:05 UTC
Integrated into 'main-golden', will be available in build *200903281400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bac1f4b232bf
User: Max Sauer <msauer@netbeans.org>
Log: #160531: Generate is-like setter for java.lang.Boolean
Comment 4 Michel Graciano 2009-07-02 23:01:41 UTC
I am really reading this or I am getting an nightmare? How could this possible, generate isXXX for java.lang.Boolean? It
is totally against JavaBean specification. Just primitive boolean must be isXXX and this fix generated several
regressions such as:
. For editor, the getter never exists since isXXX for Boolean is not valid (getter generation is always visible);
. Encapsulate fields (thanks God) don't work like this;

So, now we have an inconsistent IDE that makes users looks crazy when using facing wrong behaviours from tools that
believe in JavaBean spec like Hibernate, Swing palette components at NetBeans and several others, since we trust in what
IDE generates. The issue #168061 was created about that and I agree with Jan Lahoda, this patch _must_ be reverted since
similar with patch suggested and make available as soon as possible. I will reopen it and wait for you revert it asap
and mark this as WONTFIX. I just can't believe in that yet...
Comment 5 Max Sauer 2009-07-03 12:29:56 UTC
Reverted this one and marking as WONTFIX, since it does not follow JavaBeans spec.
---
http://hg.netbeans.org/jet-main/rev/a361b3bc8ec8


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