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

TRUNK-3407: ConceptDescription equals method fails with 2 different instances of ConceptDescription in 1.8 and earlier #282

Merged
merged 1 commit into from Jun 18, 2013

Conversation

NameFILIP
Copy link
Contributor

Change == to equals() for comparing Integers
https://tickets.openmrs.org/browse/TRUNK-3407

…nstances of ConceptDescription in 1.8 and earliergit
@NameFILIP
Copy link
Contributor Author

Fixed unit test

@NameFILIP
Copy link
Contributor Author

Haha, I call it java black magic (http://stackoverflow.com/questions/3637936/java-integer-equals-vs#answer-3637974)

1989 makes a difference, because it is bigger than 127
http://pastebin.com/6mYnAcgy

Or did you mean something different?

@dkayiwa
Copy link
Member

dkayiwa commented Apr 26, 2013

Does your current unit test fail without your changes in the equals method?

@dkayiwa dkayiwa closed this Apr 26, 2013
@dkayiwa dkayiwa reopened this Apr 26, 2013
@NameFILIP
Copy link
Contributor Author

It does fail without changes, it doesn't fail with.

@NameFILIP
Copy link
Contributor Author

Please, have a look - https://www.dropbox.com/sh/zujomeum91g0qce/hcDmolHEmI#/

@rkorytkowski
Copy link
Member

I think you could just do twice "new Integer(1)" to get 2 different objects to test the fix easier. Anyway, it's all good. I'm merging and closing. Thanks Fillip!

rkorytkowski added a commit that referenced this pull request Jun 18, 2013
TRUNK-3407: ConceptDescription equals method fails with 2 different instances of ConceptDescription in 1.8 and earlier
@rkorytkowski rkorytkowski merged commit 50ae790 into openmrs:1.8.x Jun 18, 2013
RandilaP pushed a commit to RandilaP/openmrs-core that referenced this pull request Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants