Skip to content

Remove the unused enumerators from CustomHashtable - #4367

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:lv/drop-dead-customhashtable-code
Open

Remove the unused enumerators from CustomHashtable#4367
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:lv/drop-dead-customhashtable-code

Conversation

@vogella

@vogella vogella commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

CustomHashtable, the hash table behind the JFace viewers, still carries two Enumeration implementations and its keys()/elements() accessors. Nothing in the package calls them, and since the class is package-private nothing outside can. Removing them also makes firstSlot and lastSlot write-only, since they existed only to bound the enumerator's scan, so those go too and every insert and every rehashed entry loses two branches.

Pure deletion, 101 lines, no behavior change. toString() stays because the debugger uses it to render the element map. Verified with mvn clean verify on org.eclipse.jface plus org.eclipse.jface.tests: 1315 tests, no failures.

No caller ever asked the viewer hash table for its keys or its values, so
both Enumeration implementations were dead. Without them the firstSlot and
lastSlot fields are written but never read, and dropping those takes two
branches off every insert and every rehashed entry.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Test Results

   858 files  +  286     858 suites  +286   54m 44s ⏱️ + 2m 37s
 8 308 tests ±    0   8 065 ✅ +    5  243 💤  -   5  0 ❌ ±0 
20 793 runs  +6 931  20 123 ✅ +6 716  670 💤 +215  0 ❌ ±0 

Results for commit 3a791e0. ± Comparison against base commit ee7ae1f.

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