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

Add requireTypeIdForSubtypes property for JsonTypeInfo.Value, backporting from Jackson 3.0 #229

Merged
merged 3 commits into from May 18, 2023
Merged

Add requireTypeIdForSubtypes property for JsonTypeInfo.Value, backporting from Jackson 3.0 #229

merged 3 commits into from May 18, 2023

Conversation

JooHyukKim
Copy link
Member

As discussed in #226

hashCode = 31 * hashCode + (_requireTypeIdForSubtypes ? 11 : -17);
hashCode = 31 * hashCode + (_idVisible ? 11 : -17);
return hashCode;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Since baseline is JDK 6, I refered to Objects.hashcode() implementation in JDK7 which internally use Arrays.hashcode()

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess we can merge this implementation once more, make master to use this same implementation.

Copy link
Member

Choose a reason for hiding this comment

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

SGTM

return false;
}
return value1.equals(value2);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Same as,

private static <T> boolean _equal(T value1, T value2)

I guess we can merge this implementation once more, make master to use this same implementation.

Same here also.

@cowtowncoder cowtowncoder merged commit 05a4770 into FasterXML:2.16 May 18, 2023
2 checks passed
cowtowncoder added a commit that referenced this pull request May 18, 2023
@cowtowncoder
Copy link
Member

Thank you again @JooHyukKim !

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