Skip to content

Conversation

richardelms
Copy link
Contributor

@richardelms richardelms commented Oct 13, 2025

This pull request simplifies the bugsnag-spring module by removing support for Java 8 and the legacy javax.* Spring APIs, making Java 17 and Jakarta Spring the default. The build configuration and test setup are streamlined, and the code is updated to remove conditional logic for multiple Spring/Java versions. Additionally, the scheduled task error handling logic is improved for compatibility with Spring Boot 3.

Build and Dependency Configuration Simplification:

  • The bugsnag-spring/build.gradle file is refactored to remove all Java 8 and javax.* Spring dependencies and configurations, making Java 17 and Jakarta Spring the default. Source sets and custom configurations for javax and jakarta are removed, and dependencies are consolidated. [1] [2]
  • The separate javax subproject (bugsnag-spring/javax/build.gradle and related test resources) is deleted, fully dropping support for Java 8 and legacy javax.* APIs. [1] [2]

CI Pipeline Updates:

  • The Buildkite pipeline (.buildkite/pipeline.yml) is updated to remove Java 8 Mazerunner test batches, reflecting the dropped support for Java 8. Only Java 17 tests remain.

Codebase Cleanup and API Consolidation:

  • The import selector logic in BugsnagImportSelector is simplified to always use Jakarta Spring classes, removing runtime checks for Spring/Java version and legacy javax.* configuration. [1] [2]

Scheduled Task Error Handling Improvements:

  • The ScheduledTaskConfiguration class is enhanced to better handle error handlers for scheduled tasks, including support for chaining a dedicated ErrorHandler bean if present, and improved compatibility with Spring Boot 3's TaskSchedulerRouter. [1] [2]

@richardelms richardelms self-assigned this Oct 13, 2025
@richardelms richardelms marked this pull request as draft October 13, 2025 13:28
@richardelms richardelms changed the title remove javax support uplift part 1: remove javax support, update java to v17 and update gradle to v8.10.2 Oct 14, 2025
@richardelms richardelms force-pushed the plat-15028-remove-javax branch from 47eec01 to 31a4bfd Compare October 14, 2025 12:39
@richardelms richardelms requested review from Copilot, tomlongridge and twometresteve and removed request for Copilot and twometresteve October 17, 2025 09:02
@richardelms richardelms removed the request for review from tomlongridge October 17, 2025 09:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes support for Java 8 and the javax.* Spring API in favor of Java 17 and Jakarta Spring as the default. The changes consolidate the build configuration, simplify the codebase by removing version detection logic, and improve scheduled task error handling compatibility with Spring Boot 3.

  • Removes Java 8 and javax.* Spring support, making Java 17 and Jakarta Spring the default
  • Simplifies build configuration by removing dual source sets and dependencies
  • Improves scheduled task error handling for better Spring Boot 3 compatibility

Reviewed Changes

Copilot reviewed 78 out of 81 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
settings.gradle Removes javax servlet example from included projects
scripts/build-test-repository.sh Updates repository build script with improved error handling
release.gradle Modernizes Maven publishing configuration with Java 17 support
gradle/wrapper/gradle-wrapper.properties Updates Gradle wrapper to version 8.10.2
features/project_package.feature Updates expected stack trace method names for Spring Boot 3
bugsnag-spring/build.gradle Consolidates build configuration to Jakarta/Java 17 only
bugsnag-spring/src/common/java/com/bugsnag/ScheduledTaskConfiguration.java Enhances scheduled task error handling with Spring Boot 3 compatibility
bugsnag-spring/src/common/java/com/bugsnag/BugsnagImportSelector.java Removes version detection logic, always uses Jakarta classes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


dependencies {
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("ch.qos.logback:logback-classic:1.5.18")
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

[nitpick] The janino dependency is added without explanation. Consider adding a comment explaining why this conditional compilation library is needed.

Suggested change
implementation("ch.qos.logback:logback-classic:1.5.18")
implementation("ch.qos.logback:logback-classic:1.5.18")
// Janino is required by logback-classic for conditional processing in logback configuration files (e.g., <if> statements in logback.xml)

Copilot uses AI. Check for mistakes.

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.

1 participant