Bug 572048 - Exit loop early results in wrong logic
Summary: Exit loop early results in wrong logic
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.18   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.20 M1   Edit
Assignee: Fabrice Tiercelin CLA
QA Contact: Lars Vogel CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 572155
  Show dependency tree
 
Reported: 2021-03-17 15:33 EDT by Lars Vogel CLA
Modified: 2021-04-13 06:43 EDT (History)
3 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 2021-03-17 15:33:17 EDT
For am example please see https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/177897

for (byte element : alphaData) {
			int alpha = element & 0xFF;
			if (!(alpha == 0 || alpha == 255)) {
				/* Full alpha channel transparency */
				return imageData;
			}
			if (!transparency && alpha == 0) {
				transparency = true;
				// break; --> added by clean which in not correct
 			}
		}
Comment 1 Lars Vogel CLA 2021-03-17 15:34:53 EDT
Fabrice, thanks for looking into this.
Comment 2 Eclipse Genie CLA 2021-03-20 05:19:27 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/178136
Comment 4 Fabrice Tiercelin CLA 2021-04-07 01:04:02 EDT
Verified for 4.20M1 using I20210405-1800 build