Skip to content

Third attempt at fixing Kotlin 2.2 compat#4613

Merged
adinauer merged 1 commit into08-06-second_attempt_to_fix_kotlin_2.2from
08-07-third_attempt_at_fixing_kotlin_2.2_compat
Aug 7, 2025
Merged

Third attempt at fixing Kotlin 2.2 compat#4613
adinauer merged 1 commit into08-06-second_attempt_to_fix_kotlin_2.2from
08-07-third_attempt_at_fixing_kotlin_2.2_compat

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Aug 7, 2025

📜 Description

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Third attempt at fixing Kotlin 2.2 compat ([#4613](https://github.com/getsentry/sentry-java/pull/4613))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 8d5bfcf

@adinauer adinauer marked this pull request as ready for review August 7, 2025 14:34
@adinauer adinauer merged commit 1d5a803 into 08-06-second_attempt_to_fix_kotlin_2.2 Aug 7, 2025
18 of 37 checks passed
@adinauer adinauer deleted the 08-07-third_attempt_at_fixing_kotlin_2.2_compat branch August 7, 2025 14:34
@adinauer
Copy link
Member Author

adinauer commented Aug 7, 2025

Merging this so we don't have to review changes in other PRs that were replaced in this PR

adinauer added a commit that referenced this pull request Aug 7, 2025
* Second attempt to fix Kotlin 2.2

* Format code

* Third attempt at fixing Kotlin 2.2 compat (#4613)

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
}

if (uri?.isNotBlank()) {
if (uri.isNotBlank()) {
Copy link

Choose a reason for hiding this comment

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

Bug: Null URI Handling Error

A NullPointerException can occur because the null-safe call uri?.isNotBlank() was changed to uri.isNotBlank(). The uri variable is assigned from URI.rawPath, which can return null when the URI has no path component, removing the necessary null check.

Fix in Cursor Fix in Web

adinauer added a commit that referenced this pull request Aug 11, 2025
* Fix Spring 7 and Spring Boot 4 modules

* Attempt to fix kotlin 2.2 issue

* Second attempt to fix Kotlin 2.2 (#4610)

* Second attempt to fix Kotlin 2.2

* Format code

* Third attempt at fixing Kotlin 2.2 compat (#4613)

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>

* Address compose-related issues

* Fix tests for Spring 7 and Spring Boot 4 (#4614)

* Second attempt to fix Kotlin 2.2

* Format code

* Third attempt at fixing Kotlin 2.2 compat

* Fix tests for Spring 7 and Spring Boot 4

* Move Spring 7 and Spring Boot 4 packages (#4615)

* Move Spring 7 and Spring Boot 4 packages

* Fix class not found due to OTel not supporting spring boot 4 yet (#4616)

* Format code

* some fixes

* change kotlin 1.8 to 1.9 and some cleanup

* ignore warnings about api level that is not relevant

* fix optional dependencies in SentryAutoConfiguration

* Update trace origin

* Remove duplicate e2e test config

* Update Strings for Spring 7 and Spring Boot 4

* Disable Spring Boot 4 agentless e2e tests for now

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Co-authored-by: markushi <markus.hintersteiner@sentry.io>
adinauer added a commit that referenced this pull request Aug 26, 2025
* Add new modules for Spring 7 and Spring Boot 4

* Fix Spring 7 and Spring Boot 4 modules (#4602)

* Attempt to fix kotlin 2.2 issue (#4603)

* Fix Spring 7 and Spring Boot 4 modules

* Attempt to fix kotlin 2.2 issue

* Second attempt to fix Kotlin 2.2 (#4610)

* Second attempt to fix Kotlin 2.2

* Format code

* Third attempt at fixing Kotlin 2.2 compat (#4613)

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>

* Address compose-related issues

* Fix tests for Spring 7 and Spring Boot 4 (#4614)

* Second attempt to fix Kotlin 2.2

* Format code

* Third attempt at fixing Kotlin 2.2 compat

* Fix tests for Spring 7 and Spring Boot 4

* Move Spring 7 and Spring Boot 4 packages (#4615)

* Move Spring 7 and Spring Boot 4 packages

* Fix class not found due to OTel not supporting spring boot 4 yet (#4616)

* Format code

* some fixes

* change kotlin 1.8 to 1.9 and some cleanup

* ignore warnings about api level that is not relevant

* fix optional dependencies in SentryAutoConfiguration

* Update trace origin

* Remove duplicate e2e test config

* Update Strings for Spring 7 and Spring Boot 4

* Disable Spring Boot 4 agentless e2e tests for now

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Co-authored-by: markushi <markus.hintersteiner@sentry.io>

* changelog

* fix ci

* add ignored span origins for Spring 7 and Spring Boot 4

* move changelog

* Example how to fix version mismatch (#4642)

* Fix ignored span origin

* move changelog

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Co-authored-by: markushi <markus.hintersteiner@sentry.io>
Co-authored-by: Alex Alderman Webb <alexander.webb@sentry.io>
adinauer added a commit that referenced this pull request Mar 4, 2026
…speed up tests (#4641)

* Add new modules for Spring 7 and Spring Boot 4

* Fix Spring 7 and Spring Boot 4 modules (#4602)

* Attempt to fix kotlin 2.2 issue (#4603)

* Fix Spring 7 and Spring Boot 4 modules

* Attempt to fix kotlin 2.2 issue

* Second attempt to fix Kotlin 2.2 (#4610)

* Second attempt to fix Kotlin 2.2

* Format code

* Third attempt at fixing Kotlin 2.2 compat (#4613)

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>

* Address compose-related issues

* Fix tests for Spring 7 and Spring Boot 4 (#4614)

* Second attempt to fix Kotlin 2.2

* Format code

* Third attempt at fixing Kotlin 2.2 compat

* Fix tests for Spring 7 and Spring Boot 4

* Move Spring 7 and Spring Boot 4 packages (#4615)

* Move Spring 7 and Spring Boot 4 packages

* Fix class not found due to OTel not supporting spring boot 4 yet (#4616)

* Format code

* some fixes

* change kotlin 1.8 to 1.9 and some cleanup

* ignore warnings about api level that is not relevant

* fix optional dependencies in SentryAutoConfiguration

* Update trace origin

* Remove duplicate e2e test config

* Update Strings for Spring 7 and Spring Boot 4

* Disable Spring Boot 4 agentless e2e tests for now

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Co-authored-by: markushi <markus.hintersteiner@sentry.io>

* changelog

* fix ci

* add ignored span origins for Spring 7 and Spring Boot 4

* move changelog

* Speed up tests

* docs(changelog): Add entry for external shutdown/session-flush timeout options

Co-Authored-By: Claude <noreply@anthropic.com>

* ref: Use tracingEnabledRunner in boot4 and jakarta test classes

The tracingEnabledRunner was defined but unused in spring-boot-4 and
spring-boot-jakarta. Migrate the tracing tests to use it, matching
what was already done in spring-boot.

Co-Authored-By: Claude <noreply@anthropic.com>

* ref: Add Millis suffix to ExternalOptions timeout fields

Rename shutdownTimeout/sessionFlushTimeout to
shutdownTimeoutMillis/sessionFlushTimeoutMillis for consistency
with SentryOptions naming convention.

Co-Authored-By: Claude <noreply@anthropic.com>

* ref: Add Millis suffix to ExternalOptions timeout fields

Rename shutdownTimeout/sessionFlushTimeout to
shutdownTimeoutMillis/sessionFlushTimeoutMillis in ExternalOptions
for consistency with SentryOptions naming convention. Also rename
the sentry.properties keys from shutdown-timeout to
shutdown-timeout-millis and session-flush-timeout to
session-flush-timeout-millis.

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(changelog): Restructure timeout options changelog entry

List each configuration method separately for clarity.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(test): Use baseContextRunner for transport factory tests

Tests asserting AsyncHttpTransportFactory must not use contextRunner
which includes NoOpTransportConfiguration, as the NoOp bean would
override the auto-configured transport factory.

Co-Authored-By: Claude <noreply@anthropic.com>

* Format code

* ci: retrigger CI

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Co-authored-by: markushi <markus.hintersteiner@sentry.io>
Co-authored-by: Claude <noreply@anthropic.com>
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