Skip to content

Conversation

@rombert
Copy link
Contributor

@rombert rombert commented Jan 23, 2026

Implement a fallback for adapting from the legacy javax servlet requerst when adapting from the jakarta request fails.

Adapters are normally expected to be registered for the legacy javax.servlet-based APIs and we need the adaptions to keep working for backwards compatibility.

…letRequest cannot be instantiated a Jakarta context

Implement a fallback for adapting from the legacy javax servlet requerst when adapting
from the jakarta request fails.

Adapters are normally expected to be registered for the legacy javax.servlet-based APIs and
we need the adaptions to keep working for backwards compatibility.
@rombert
Copy link
Contributor Author

rombert commented Jan 23, 2026

This seems to fix the problem but needs more testing.

At a minimum we will need to implement the same fallback for the response object.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@kwin
Copy link
Member

kwin commented Jan 24, 2026

Shouldn't this kind of fallback rather be implemented in Sling Models (i.e. register the Model for both servlet request types). Having this for all kind of adaptations feels too magic to me.

@rombert
Copy link
Contributor Author

rombert commented Jan 24, 2026 via email

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.

2 participants