Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 572213

Summary: [cleanup] Dogfooding - Use "Exit loop earlier" in JDT core
Product: [Eclipse Project] JDT Reporter: Lars Vogel <Lars.Vogel>
Component: CoreAssignee: Lars Vogel <Lars.Vogel>
Status: VERIFIED FIXED QA Contact: Fabrice Tiercelin <fabrice.tiercelin>
Severity: normal    
Priority: P3 CC: fabrice.tiercelin, Lars.Vogel, manoj.palat, Vikas.Chandra
Version: 4.19   
Target Milestone: 4.20 M1   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/178251
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=d582e1ad075577c3466006bbd2b9c77888da4254
https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/178503
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=98d73a5b7aa3afcd5971a300cecede6c7f409664
Whiteboard:
Bug Depends on:    
Bug Blocks: 571430    

Description Lars Vogel CLA 2021-03-23 05:15:50 EDT
This ticket uses and tests the "Exit loop earlier"  cleanup feature:
 - It reviews the feature.
 - It improves performance
If the dogfooding leads to a regression, a ticket should be created for the cleanup and the dogfooding should be pending.

The dogfooding should not be merged if there is opened/reopened bugs related to the cleanup. If a bug is fixed, the dogfooding should be regenerated using the latest version of the feature.

Here is an explanation of the cleanup of Bug 568822:

Before:

for (int i = 0; i < typeArguments.length; i++) {
		if(typeArguments[i] != null) {
			isParameterized = true;
		}
	}

After:

for (int i = 0; i < typeArguments.length; i++) {
		if(typeArguments[i] != null) {
			isParameterized = true;
			break;
		}
	}
Comment 1 Eclipse Genie CLA 2021-03-23 05:19:26 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/178251
Comment 2 Fabrice Tiercelin CLA 2021-03-27 02:25:53 EDT
*** Bug 572155 has been marked as a duplicate of this bug. ***
Comment 4 Lars Vogel CLA 2021-03-29 08:48:44 EDT
Found one more place.
Comment 5 Eclipse Genie CLA 2021-03-29 08:50:28 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/178503
Comment 7 Lars Vogel CLA 2021-03-30 05:17:50 EDT
Thanks, Fabrice for the fast reviews.
Comment 8 Vikas Chandra CLA 2021-04-06 03:30:52 EDT
verified by code inspection