Skip to content

Comments

change hash key to long#4

Merged
eswann merged 1 commit intoMapsterMapper:masterfrom
chaowlert:long-hash
Feb 24, 2015
Merged

change hash key to long#4
eswann merged 1 commit intoMapsterMapper:masterfrom
chaowlert:long-hash

Conversation

@chaowlert
Copy link
Collaborator

Hi,

Based on your library, you use int as key of record of {TSource + TDestination + has destination flag}.
Even it is very small chance, but it is possible to have key collision when there are a lot of type mappings.

My solution is using long, TSource will use high-order number, TDestination will use low-order number, and destination flag will be positive and negative.

Please review

eswann added a commit that referenced this pull request Feb 24, 2015
@eswann eswann merged commit da4eec7 into MapsterMapper:master Feb 24, 2015
@eswann
Copy link
Collaborator

eswann commented Feb 27, 2015

This pull reqest caused several tests to fail...had to nix it. Good idea but did you try running the tests?

@eswann
Copy link
Collaborator

eswann commented Feb 27, 2015

I was able to fix the failures by updating the signatures of the ClassAdapter AdaptInvoker signatures to be long,int instead of int,int. Please verify the unit tests going forward, but I agree it's a good update.

@chaowlert
Copy link
Collaborator Author

Hi, sorry, I just ignore notification without realize you have comments. I'm so sorry about bug from my PR. For all unit tests, I will do it soon.

@eswann
Copy link
Collaborator

eswann commented Mar 3, 2015

No problem...thanks for the contributions!

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