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.
"Generate hashCode()" generates code like: this.field != null ? this.field.hashCode() : 0 It is generally preferable to express logical conditions without negation when there is the choice. (There are situations where there is no choice, such as an 'if' on a negative condition whith no 'else' branch. But this is not the case here.) I'd like to suggest to generate this.field == null ? 0 : this.field.hashCode() instead. Besides getting rid of the (double) negation ("is not not an object"), it also places the simple case ("0") first, which minimizes the mental stack when reading such code.