Do not export "javax.annotation" packages#2699
Merged
iloveeclipse merged 1 commit intospotbugs:masterfrom Nov 15, 2023
Merged
Conversation
This prevents spotbugs provided "javax.annotation" packages to be consumed by bundles that expect default (not spotbugs) "javax.annotation" packages that were previously shipped with "javax.annotation" bundle with SDK. The problem appears since 4.30 SDK doesn't ship "javax.annotation" bundle anymore, so spotbugs exported packages are taken as alternative if the application doesn't have other providers and in worst case they are not what applications actually expected to receive or cause dependency cycles (spotbugs requires some bundle that requires some other that imports "javax.annotation" package that is coming from spotbugs). The packages originally were needed by detectors shipped as bundles for IDE, but this is a very seldom case and in that case spotbugs-annotations is the better alternative. We should not export "wrong" javax packages anymore, it wasn't nice and it can cause only trouble now. See eclipse-platform/eclipse.platform.releng.aggregator#1056
ThrawnCA
approved these changes
Nov 15, 2023
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.
This prevents spotbugs provided "javax.annotation" packages to be consumed by bundles that expect default (not spotbugs) "javax.annotation" packages that were previously shipped with "javax.annotation" bundle with SDK.
The problem appears since 4.30 SDK doesn't ship "javax.annotation" bundle anymore, so spotbugs exported packages are taken as alternative if the application doesn't have other providers and in worst case they are not what applications actually expected to receive or cause dependency cycles (spotbugs requires some bundle that requires some other that imports "javax.annotation" package that is coming from spotbugs).
The packages originally were needed by detectors shipped as bundles for IDE, but this is a very seldom case and in that case spotbugs-annotations is the better alternative. We should not export "wrong" javax packages anymore, it wasn't nice and it can cause only trouble now.
See eclipse-platform/eclipse.platform.releng.aggregator#1056