commit | be22caf299c44efb7ce50e31f8132b970838f7c0 | [log] [tgz] |
---|---|---|
author | Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr> | Sun Apr 11 19:31:26 2021 +0200 |
committer | Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr> | Fri Apr 16 13:54:16 2021 -0400 |
tree | 8f3473ef9d32fd32defe03de3003c7122f39edc6 | |
parent | 3f805119375c67567506423e4fe480c5bbe995af [diff] |
Bug 572763 - [AutoRefactor #73/153] long primitive rather than wrapper Replace Long wrapper object by long primitive type when an object is not necessary: - The variable must be not null, - The result should not make more autoboxing/unboxing than the original code. Given: Long shouldBeAPrimitiveLong = Long.MIN_VALUE; aLong &= shouldBeAPrimitiveLong; anotherLong += shouldBeAPrimitiveLong; yetAnotherLong ^= shouldBeAPrimitiveLong; When: Applying "Primitive rather than wrapper" clean up... Then: long shouldBeAPrimitiveLong = Long.MIN_VALUE; aLong &= shouldBeAPrimitiveLong; anotherLong += shouldBeAPrimitiveLong; yetAnotherLong ^= shouldBeAPrimitiveLong; Also add tests for int primitives. Change-Id: I63971c8154d4b1a2baa50704147d000e44882b11 Signed-off-by: Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr> Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/179166
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.