Skip to content

Suppress deprecation warnings and update deprecated API calls - #7321

Merged
chrisrueger merged 1 commit into
bndtools:masterfrom
chrisrueger:7316-fix-warnings
Jul 20, 2026
Merged

chrisrueger merged 1 commit into
bndtools:masterfrom
chrisrueger:7316-fix-warnings

Conversation

@chrisrueger

@chrisrueger chrisrueger commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #7316
Add @SuppressWarnings annotations for deprecated and removal APIs across multiple modules. Update ExtendedFormEditor to use current JFaceResources API methods (destroy/create instead of destroyImage/createImage). Remove deprecated servicefactory parameter from Component annotation in test.

@chrisrueger
chrisrueger force-pushed the 7316-fix-warnings branch 3 times, most recently from 9c430be to bf07944 Compare July 18, 2026 12:07
@chrisrueger

chrisrueger commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Summary

  • for calls in our own codebase to deprecated methods in our own codebase I added @SuppressWarning since we plan to remove in bnd 8.0 but it is not clear when that will be (see Deprecation / Breaking Change collector for bnd 8.0.0 #6756)
  • calls to external code's deprecated methods I tried to fix and use the non-deprecated replacement
  • also fixed some other warnings which showed up in Eclipse (unused variables/imports, unclosed resources...)

The remaining warning is from bnd

> Task :biz.aQute.repository:jar
warning: Export aQute.p2.provider,  has 1,  private references [aQute.p2.packed]

which I'd prefer to adresse separatly (not sure how long this exists)
My Eclipse problems view now looks cleaner again (all java warnings gone) and tests seem to pass.

@bjhargrave a review would be nice. Latests build output is https://github.com/bndtools/bnd/actions/runs/29644334080/job/88079918888

I can squash commits after review.

@chrisrueger
chrisrueger marked this pull request as ready for review July 18, 2026 12:41
Add @SuppressWarnings annotations for deprecated and removal APIs across multiple modules. Update ExtendedFormEditor to use current JFaceResources API methods (destroy/create instead of destroyImage/createImage). Remove deprecated servicefactory parameter from Component annotation in test.

fix gradle-plugin warnings

fix JUnit deprecation warning

Update ArgumentsProvider to match JUnit 5.10+ API
JUnit Jupiter's ArgumentsProvider interface changed to include a ParameterDeclarations parameter in the provideArguments method. Update three test classes that implement custom argument providers to match the new signature.

try to fix maven deprecation warnings

Replace Maven @component with @Inject in Maven plugins

Update all Maven plugin mojos to use standard JSR-330 @Inject annotation instead of Maven-specific @component annotation. This removes the warnings and uses the dependency injection approach to use standard Java conventions supported by Maven 3.9+.
See https://maven.apache.org/maven-jsr330.html#how-to-use-jsr-330-in-plugins

Clean up resource management and remove unused code

Wrap P2Indexer instantiations in try-with-resources for proper cleanup, remove unused imports

Changes:
- Wrap P2Indexer objects in try-with-resources blocks to ensure cleanup
- Move AssertJ SoftAssertions imports to group with test configuration
- Remove unused imports (java.util.Map, org.apache.maven.project.MavenProjectHelper)
- Remove unused FEATURE_PATTERN constant from R5LabelFormatter
- Fix minor whitespace inconsistencies

Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger
chrisrueger merged commit e1b5f4f into bndtools:master Jul 20, 2026
11 checks passed
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.

[build] Fix warnings in build

2 participants