Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #249: sanitize existing source bundle manifest #266

Merged
merged 3 commits into from
May 23, 2021
Merged

Issue #249: sanitize existing source bundle manifest #266

merged 3 commits into from
May 23, 2021

Conversation

emweber
Copy link
Contributor

@emweber emweber commented May 4, 2021

Change-Id: Ie8d16185942228b730b0e143ea551918ed2614b6

Change-Id: Ie8d16185942228b730b0e143ea551918ed2614b6
Copy link
Collaborator

@sparsick sparsick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a unit test.

*/
private void sanitizeSourceManifest(Manifest manifest) {
Attributes attributes = manifest.getMainAttributes();
if (!attributes.isEmpty()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Stream API:

attributes.keySet().removeIf(header -> Arrays.asList(Analyzer.EXPORT_PACKAGE,
                Analyzer.EXPORT_SERVICE, Analyzer.PROVIDE_CAPABILITY ).contains(header));

@sparsick
Copy link
Collaborator

sparsick commented May 8, 2021

@emweber Thank you for your PR. Please add a unit test or an integration test, if it is easier to write.

Change-Id: Ie8d16185942228b730b0e143ea551918ed2614b6
Change-Id: Ie8d16185942228b730b0e143ea551918ed2614b6
@sparsick sparsick linked an issue May 23, 2021 that may be closed by this pull request
@sparsick
Copy link
Collaborator

I checked this PR locally and it ran successfully. Currently, the Github Action sucks a little.

@sparsick sparsick merged commit 6f68c1b into reficio:master May 23, 2021
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.

[ENH] Sanitize broken manifest in source bundles
2 participants