commit | 91f439fd840c3e99b6f9b6a672bcf0794ef32aa0 | [log] [tgz] |
---|---|---|
author | Jeff Johnston <jjohnstn@redhat.com> | Wed Apr 07 16:14:12 2021 -0400 |
committer | Jeff Johnston <jjohnstn@redhat.com> | Wed Apr 21 15:42:14 2021 -0400 |
tree | e8bb8c3f1fe253b8224d162b68e95a40f7f932df | |
parent | f67918ba7cfda237122dd6db4bb254ba328c931c [diff] |
Bug 572656 - Remove unnecessary array creation may change called method - fix UnnecessaryArrayCreationFix to calculate where to start looking for methods that might match if array creation is unwrapped - for super method calls, constructor calls, calls from expression, and static method calls where the method is imported, use the declaring class of the method called; otherwise use the enclosing class where the call is made - also check for nested classes and allow matches for private methods found in enclosing class - add new tests and reformat some of UnnecessaryArrayCreationFix Given: public class A { public class ChildClass extends A { public void overloadedMethod(int number) { } public void doNotCallAnotherMethod(int number) { overloadedMethod(new int[]{number}); } } public void overloadedMethod(int... numbers) { } } Applying "Remove unnecessary array creation" cleanup should not change the overloadedMethod() call because an existing method with a single int argument exists. Change-Id: Id45393641d8cd078e2d8a2a769f8a623add7fb6c Signed-off-by: Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr> Signed-off-by: Jeff Johnston <jjohnstn@redhat.com> Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/178974 Tested-by: JDT Bot <jdt-bot@eclipse.org>
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.