ManifestUtils.loadManifest returns a default manifest upon absence #91
Open
hintzed wants to merge 1 commit intoakhikhl:masterfrom
hintzed:master
Open
ManifestUtils.loadManifest returns a default manifest upon absence #91hintzed wants to merge 1 commit intoakhikhl:masterfrom hintzed:master
hintzed wants to merge 1 commit intoakhikhl:masterfrom
hintzed:master
Conversation
… manifest instead of returning the manifest from the previous library
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.
I think there is currently a bug in ManifestUtils.loadManifest when it comes to jars without META-INF/MANIFEST.MF (for instance 'javax.inject:javax.inject:1'), as the method apparently always expects to find a manifest file. Since each call of loadManifest also replaces a previous temp file, a missing manifest file might actually get replaced by the still present manifest from the previous call (hence usually from another library), thus returning the wrong manifest, leading to strange effects.
I propose to fix this by deleting the temp manifest file after reading it as well as by returning a default manifest in case the library did not contain an initial manifest.