Skip to content

Remove unused accessors from the PNG chunk classes - #3492

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:remove-dead-png-chunk-accessors
Open

Remove unused accessors from the PNG chunk classes#3492
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:remove-dead-png-chunk-accessors

Conversation

@vogella

@vogella vogella commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Five accessors in the PNG chunk classes have no callers anywhere in the repository: PngChunk.getReference, PngChunk.getInt16, PngIhdrChunk.getCompressionMethod, PngIhdrChunk.getFilterMethod and PngIdatChunk.getDataByteAtOffset. All five are package-private, so nothing outside org.eclipse.swt.internal.image could have been calling them either.

Only the getters go. The matching setters are all still in use, and the compressionMethod and filterMethod fields are still read by PngIhdrChunk.validate and getFilterMethodString, so neither field is left write-only.

Verified by compiling the gtk, win32 and cocoa bundles from source with javac and ecj, and by decoding the 608 images in this repository with a build from before and after the change; the decoded pixel data, palettes and transparency masks are byte-identical.

PngChunk.getReference, PngChunk.getInt16, PngIhdrChunk.getCompressionMethod,
PngIhdrChunk.getFilterMethod and PngIdatChunk.getDataByteAtOffset have no
callers anywhere in the repository. All five are package-private, so nothing
outside org.eclipse.swt.internal.image could have reached them either.

The matching setters stay: setReference, setInt16, setCompressionMethod and
setFilterMethod are all still in use, and the compressionMethod and
filterMethod fields are still read by PngIhdrChunk.validate and
getFilterMethodString, so no field becomes write-only.
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

  212 files  ±0    212 suites  ±0   27m 46s ⏱️ ±0s
4 894 tests ±0  4 870 ✅ ±0   24 💤 ±0  0 ❌ ±0 
7 065 runs  ±0  6 897 ✅ ±0  168 💤 ±0  0 ❌ ±0 

Results for commit 79e3228. ± Comparison against base commit 4755f49.

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