Bug 560149 - Generate hashCode and equals should use Java 1.7 hash and equals method if project is using Java 1.7 or higher
Summary: Generate hashCode and equals should use Java 1.7 hash and equals method if pr...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2020-02-14 07:26 EST by Lars Vogel CLA
Modified: 2024-01-29 18:24 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-02-14 07:26:03 EST
If a project uses Java 1.7 or higher, I suggest to use the Objects.hash and Objects.equals method for generating the hashCode and equals method as default.
Comment 1 Stephan Herrmann CLA 2020-02-15 07:59:19 EST
Which part of the problem do you imagine to be solved by those methods? Please provide an example of what style of code you would like to see generated.
Comment 2 Eclipse Genie CLA 2022-02-05 16:16:37 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2024-01-27 01:42:06 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Jeff Johnston CLA 2024-01-29 18:24:14 EST
The current create hashCode() and equals() has a defaulted checkbox to use Objects.hash and Objects.equals