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.
Given private int x; private URL stuff; private String whatever; rather than generating @Override public int hashCode() { int hash = 3; hash = 17 * hash + this.x; hash = 17 * hash + Objects.hashCode(this.stuff); hash = 17 * hash + Objects.hashCode(this.whatever); return hash; } I would expect the simpler and more readable @Override public int hashCode() { return Objects.hash(x, stuff, whatever); }
This improvement benefits code clarity and takes advantage of features introduced since Java 7