commit | e68681d355907f63d8e0a78914ade9e5ac88e930 | [log] [tgz] |
---|---|---|
author | Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr> | Mon Mar 29 20:15:43 2021 +0200 |
committer | Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr> | Tue Mar 30 23:45:42 2021 -0400 |
tree | c547dddf462b55cdf02f94506755f6d3f3f2a19b | |
parent | 866590a780e0600687cf52d14b23b43627f138fe [diff] |
Bug 572426 - [AutoRefactor immigration #67/151] [cleanup & saveaction] Implicit comparator Removes the comparator declaration if it is the default one: - The declared comparator should be an equivalent to the natural order, - Remove anonymous class, lambda, Comparator.comparing(), Comparator.naturalOrder() and null, - Apply on List.sort(Comparator), Collections.sort(List, Comparator), Collections.max(Collection, Comparator) and Collections.min(Collection, Comparator), - If the comparator is used in the method List.sort(Comparator), the method is converted into Collections.sort(List). Given: Collections.sort(listToSort, new Comparator<Date>() { @Override public int compare(Date o1, Date o2) { return o1.compareTo(o2); } }); When: Clean up the code enabling "Use implicit comparator when possible" Then: Collections.sort(listToSort); Change-Id: Ic98952f83de7fede5214b18ecad639f901abd43e Signed-off-by: Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr>
Thanks for your interest in this project.
The JDT UI implements the user interface for the Java IDE. This includes views like Package Explorer and JUnit, the Java and properties files editors, Java search, and refactorings. Website: http://www.eclipse.org/jdt/ui/
Contributions to JDT UI are most welcome. There are many ways to contribute, from entering high quality bug reports, to contributing code or documentation changes. For a complete guide, see the [How to Contribute] 1 page on the team wiki.
Information regarding source code management, builds, coding standards, and more.
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
Public forum for Eclipse JDT users.
This project uses Bugzilla to track ongoing development and issues.
Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!
Contact the project developers via the project's “dev” list.