Remove unused accessors from the PNG chunk classes - #3492
Open
vogella wants to merge 1 commit into
Open
Conversation
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.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five accessors in the PNG chunk classes have no callers anywhere in the repository:
PngChunk.getReference,PngChunk.getInt16,PngIhdrChunk.getCompressionMethod,PngIhdrChunk.getFilterMethodandPngIdatChunk.getDataByteAtOffset. All five are package-private, so nothing outsideorg.eclipse.swt.internal.imagecould have been calling them either.Only the getters go. The matching setters are all still in use, and the
compressionMethodandfilterMethodfields are still read byPngIhdrChunk.validateandgetFilterMethodString, 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.