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

Do not export "javax.annotation" packages #2699

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

iloveeclipse
Copy link
Member

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

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
@iloveeclipse iloveeclipse merged commit f839cac into spotbugs:master Nov 15, 2023
3 checks passed
@iloveeclipse iloveeclipse deleted the javax branch November 15, 2023 05:44
@hazendaz hazendaz added this to the SpotBugs 4.8.2 milestone Dec 18, 2023
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.

None yet

3 participants