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 253805 - "Equals&Hashcode"Code generator creates empty methods, when no field is selected
Summary: "Equals&Hashcode"Code generator creates empty methods, when no field is selected
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-26 12:03 UTC by markiewb
Modified: 2015-07-30 01:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2015-07-26 12:03:31 UTC
Noticed while testing http://services.netbeans.org/synergy/client/app/#/case/2455/suite/1897/edit

* Take this class
class NewClass2 {
    String a;
    int b;
    Object c;
}
* Call "Insert Code...|Generate equals&hashcode"
* do not choose any field and click generate

ACTUAL: Dummy hashCode/ dummy equals method is generated
EXPECTED: Do not allow to generate such dummy/empty equals/hashcode implementations. IMHO there is no use for them, isn't it? If there is a usecase I am not aware of, please resolve this issue as invalid.

Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\markiewb\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\markiewb\AppData\Local\NetBeans\Cache\8.1beta
Comment 1 Dusan Balek 2015-07-29 14:54:26 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/76dbe186eaa2
Comment 2 Quality Engineering 2015-07-30 01:25:06 UTC
Integrated into 'main-silver', will be available in build *201507300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/76dbe186eaa2
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #253805 - "Equals&Hashcode"Code generator creates empty methods, when no field is selected - fixed.