Stop using deprecated NoStackTraceThrowable in vertx-core internals - #6283
Open
jnbdz wants to merge 2 commits into
Open
Stop using deprecated NoStackTraceThrowable in vertx-core internals#6283jnbdz wants to merge 2 commits into
jnbdz wants to merge 2 commits into
Conversation
Contributor
Author
|
Re-running ECA validation after linking Eclipse and GitHub accounts. |
jnbdz
force-pushed
the
issue-5012-nostacktrace-removal
branch
from
August 6, 2026 02:01
d2d5ff9 to
4aca8c7
Compare
Motivation: NoStackTraceThrowable is deprecated for removal and 17bad9d introduced a transition path: users should observe VertxException instead. However vertx-core internals still instantiate NoStackTraceThrowable, so failures created from a message or a null cause still surface the deprecated type. Changes: Replace the internal instantiations in Completable, Promise, FailedFuture and FutureImpl with the equivalent VertxException.noStackTrace factory. The deprecated classes remain untouched, scheduled for removal in Vert.x 6. Fixes eclipse-vertx#5012
Run the shared HttpClientTimeoutTest suite over HTTP/3 with the Http3Configurator wiring and assert that client request timeout failures are TimeoutException instances carrying no stack trace, across HTTP/1, HTTP/2 and HTTP/3. Tests relying on behaviours not yet available over HTTP/3 are ignored with a documented reason.
jnbdz
force-pushed
the
issue-5012-nostacktrace-removal
branch
from
August 6, 2026 02:01
4aca8c7 to
2cce3e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes #5012.
NoStackTraceThrowableandNoStackTraceExceptionare@Deprecated(forRemoval = true), and 17bad9d introduced the transition path: users should catch/observeVertxExceptioninstead, with the class removal itself planned for Vert.x 6.However vertx-core internals still instantiate
NoStackTraceThrowable, so failures created from a message (Promise#fail(String),Promise#tryFail(String),Future#failedFuture(String),Completable#fail(String)) or from anullcause still surface the deprecated type at runtime.Changes
Completable,Promise,FailedFutureandFutureImplwith the equivalentVertxException.noStackTrace(...)factory. Message and no-stack-trace behaviour are unchanged; the runtime type broadens toVertxException(the direct superclass and the documented replacement).NoStackTraceExceptionhas no remaining usage.NoStackTraceTimeoutExceptionis intentionally out of scope: it is not deprecated and must remain ajava.util.concurrent.TimeoutExceptionfor the HTTP client timeout contract.FutureTestnow pins the failure contract (VertxExceptionexact class, message preserved, empty stack trace) for the message/null-cause paths.HttpClientTimeoutTestsuite now also runs over HTTP/3 (Http3ClientTimeoutTestwired throughHttp3Configurator) and asserts that client request timeout failures areTimeoutExceptioninstances carrying no stack trace across HTTP/1, HTTP/2 and HTTP/3. HTTP/3 tests relying on behaviours not yet available (pool saturation semantics, client re-creation fromHttpClientOptions, request idle timeout on streams) are@Ignored with documented reasons.Compatibility
Code catching
VertxException(the documented replacement) is unaffected sinceNoStackTraceThrowable extends VertxException. Onlyinstanceof NoStackTraceThrowablechecks observe the change, which is the pattern the deprecation instructs migrating away from.