Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #2363: Extract Throwable should be irrelevant to the count of patternAnalysis #2368

Conversation

SeasonPanPan
Copy link
Contributor

Fix issue #2363: Extract Throwable should be irrelevant to the count of patternAnalysis

@SeasonPanPan
Copy link
Contributor Author

Hello, for this issue, I have some questions about it, the first modification is to keep the original judgment of the count of parameters and placeholders, and change args.length > analysis.placeholderCount to args.length >= analysis.placeholderCount, but I also thought that if the user sets the last parameter to an exception, it is more appropriate to print out the exception stack, It has nothing to do with the count of placeholders.

I hope that teachers can explain the intent of this code?

Copy link
Contributor

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

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

I like the idea of using the last parameter as Throwable (and removing it from the parameter list), whenever possible, but this constitutes a breaking change.

You can achieve the same effect implementing a separate MessageFactory2.

@SeasonPanPan
Copy link
Contributor Author

@ppkarwasz I got your point, thank you.

@SeasonPanPan SeasonPanPan deleted the issue2363_fix_ParameterizedMessage_throwable branch March 19, 2024 13:20
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.

None yet

2 participants