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

Retrofit ContentReference with new ErrorReportConfiguration #1070

Merged

Conversation

JooHyukKim
Copy link
Member

part of #1066
(blocked by #1068)

@@ -203,10 +249,11 @@ public Object getRawContent() {
* which content is counted, either bytes or chars) to use for truncation
* (so as not to include full content for humongous sources or targets)
*
* @see ErrorReportConfiguration#builder()#_maxRawContentLength
* @return Maximum content snippet to include before truncating
*/
protected int maxContentSnippetLength() {
Copy link
Member Author

Choose a reason for hiding this comment

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

wrt method name, I think we need method named maxRawContentLength() to return _maxRawContentLength, not maxContentSnippetLength.

Since the method is protected., we can think of two options do with its name.

  1. Direclty change name. Since it is "Internal" accessor as mentioned in JavaDoc, shouldn't be used outside class
Suggested change
protected int maxContentSnippetLength() {
protected int maxRawContentLength() {
  1. Since method is protected, take two steps. Deprecate original maxContentSnippetLength() and create new maxRawContentLength()

Copy link
Member

Choose a reason for hiding this comment

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

Let's go with straight change since it is internal (option (1)). I feel confident this won't break usage by others, given it is reasonable recently added internal method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great!

@JooHyukKim JooHyukKim marked this pull request as ready for review August 1, 2023 02:22
@cowtowncoder cowtowncoder merged commit 75b060e into FasterXML:2.16 Aug 1, 2023
@JooHyukKim JooHyukKim deleted the 1043-3-clean-retrofit-ContentReference branch August 1, 2023 13:54
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