Skip to content

Created StackTracePrinter instances have no access to the Environment#50303

Merged
philwebb merged 1 commit into
spring-projects:3.5.xfrom
mheath:custom_stacktraceprinter_with_environment
May 12, 2026
Merged

Created StackTracePrinter instances have no access to the Environment#50303
philwebb merged 1 commit into
spring-projects:3.5.xfrom
mheath:custom_stacktraceprinter_with_environment

Conversation

@mheath

@mheath mheath commented May 6, 2026

Copy link
Copy Markdown
Contributor

Being able to create a StackTracePrinter that delegates to the StandardStackTracePrinter lacks flexibility because the custom StackTracePrinter does not have access to the Environment. This change add the Environment to the StackTracePrinter instantiator so that custom StackTracePrinter implementations can customize the StandardStackTracePrinter according to environment property values.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 6, 2026
@mheath mheath force-pushed the custom_stacktraceprinter_with_environment branch from 59bddbd to 39ffa3e Compare May 6, 2026 18:16
@philwebb philwebb changed the title Allow Environment to be passed to custom StackTracePrinter instances Created StackTracePrinter instances have no access to the Environment May 7, 2026
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 7, 2026
@philwebb philwebb added this to the 3.5.x milestone May 7, 2026
@philwebb

philwebb commented May 7, 2026

Copy link
Copy Markdown
Member

Thanks @mheath! I think I consider this a bug of omission, especially as the fix looks pretty minimal. I'll try to get it into 3.5.x.

@philwebb philwebb self-assigned this May 7, 2026
@philwebb

Copy link
Copy Markdown
Member

@mheath Are you able to add a DCO line to your commit? "Signed-off-by: Author Name authoremail@example.com".

@philwebb philwebb added the status: blocked An issue that's blocked on an external project change label May 12, 2026
@mheath mheath force-pushed the custom_stacktraceprinter_with_environment branch from 39ffa3e to cdef06f Compare May 12, 2026 17:48
@mheath

mheath commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

@philwebb Done.

@philwebb philwebb changed the base branch from main to 3.5.x May 12, 2026 19:59
@philwebb philwebb force-pushed the custom_stacktraceprinter_with_environment branch from cdef06f to 686db1e Compare May 12, 2026 20:00
@philwebb philwebb closed this in 328c65d May 12, 2026
@philwebb philwebb merged commit 328c65d into spring-projects:3.5.x May 12, 2026
1 check failed
@philwebb philwebb modified the milestones: 3.5.x, 3.5.15 May 12, 2026
@philwebb philwebb removed the status: blocked An issue that's blocked on an external project change label May 12, 2026
@philwebb

Copy link
Copy Markdown
Member

Thanks! This has now been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants