Skip to content

[Win32] Remove unused ImageList.remove() method - #3464

Merged
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:remove-dead-imagelist-remove-method
Jul 27, 2026
Merged

[Win32] Remove unused ImageList.remove() method#3464
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:remove-dead-imagelist-remove-method

Conversation

@HeikoKlare

Copy link
Copy Markdown
Contributor

The ImageList.remove(int) method has no caller anywhere in the SWT codebase and it's not public API either. Besides being dead code, its implementation was also subtly wrong: after shifting the images array down it cleared images[index] instead of the now-vacated last slot images[count], which would corrupt the images-to-native mapping if it were ever used.

Rather than fixing an unreachable method, remove it entirely to avoid accidental usage of a buggy method by future callers.

The ImageList.remove(int) method has no caller anywhere in the SWT
codebase and it's not public API either. Besides being dead code, its
implementation was also subtly wrong: after shifting the images array
down it cleared images[index] instead of the now-vacated last slot
images[count], which would corrupt the images-to-native mapping if it
were ever used.

Rather than fixing an unreachable method, remove it entirely to avoid
accidental usage of a buggy method by future callers.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results (win32)

   33 files  ±0     33 suites  ±0   5m 1s ⏱️ -5s
4 860 tests ±0  4 784 ✅ ±0  76 💤 ±0  0 ❌ ±0 
1 389 runs  ±0  1 365 ✅ ±0  24 💤 ±0  0 ❌ ±0 

Results for commit fb73a9a. ± Comparison against base commit 57a97f2.

@HeikoKlare
HeikoKlare merged commit dfbe84b into eclipse-platform:master Jul 27, 2026
18 checks passed
@HeikoKlare
HeikoKlare deleted the remove-dead-imagelist-remove-method branch July 27, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant