Skip to content

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

@JooHyukKim JooHyukKim May 18, 2023

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

@JooHyukKim JooHyukKim May 18, 2023

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
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.

2 participants