Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

perf: avoid creating exceptions when no hook implements the error stage

Aperta
#2,056 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@toddbaert ci sta già lavorando.

Dal 8/10/2026.

  • #2057 di @toddbaert — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

When no provider is set (or the provider is NOT_READY/FATAL), evaluateFlag throws an exception internally to reach its catch block. Similarly, for provider-returned errors, we create an exception to pass to error hooks, even if no hook implements error.

The ProviderNotReadyError stack trace is suppressed, but APM agents that instrument exceptions can still capture their own, which adds overhead to every evaluation.

Proposal:

  • don't throw for NOT_READY/FATAL; build the error details directly
  • only create the exception if an attached hook actually overrides error (detected once per hook class)

Results (callers see the same errorCode, reason and value) are unchanged. Hooks that don't override error keep their no-op default, and the SDK just skips calling it.

Lingua principale
Java
Stelle
128
Fork
60
Merge medio
19h 11m
PR unite (30g)
19

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di open-feature/java-sdk

Tutte le issue di open-feature/java-sdk

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.