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.
Product Version = NetBeans IDE 7.3 (Build 201302132200) Operating System = Windows 7 version 6.1 running on x86 Java; VM; Vendor = 1.7.0_15 Runtime = Java HotSpot(TM) Client VM 23.7-b01 I have a class that looks like this: class MyClass { String variable; String path; MyEnum type; } This is what NetBeans generated: @Override public int hashCode() { int hash = 7; hash = 29 * hash + Objects.hashCode(this.variable); hash = 29 * hash + Objects.hashCode(this.path); hash = 29 * hash + (this.type != null ? this.type.hashCode() : 0); return hash; } The treatment of the member "type" is just a hard-coded version of what Objects.hashCode is doing for the other memebers. Why not use Objects.hasCode for enums as well?
Created attachment 132340 [details] IDE log
Fixed in the trunk: http://hg.netbeans.org/jet-main/rev/4f0eb668a631
verified in trunk
release73: http://hg.netbeans.org/releases/rev/3a416ad27ba2
Integrated into 'releases', will be available in build *201305042200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/3a416ad27ba2 User: Jan Lahoda <jlahoda@netbeans.org> Log: #227171: use Objects.hashCode also for fields with an enum type.