-
Notifications
You must be signed in to change notification settings - Fork 83
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
Problems with equals method #46
Comments
Thanks for the comment. Would you be willing to create a small pull request? Then I can take a look at it and see if the change would break other places. |
Haha, I'm not devlopper, never done that, but I can try 👍 |
Hi again, Sorry I need some help here. I've installed github desktop on my PC, cloned the repo, created a branch, edited the Hash.java file and commited the change, but when I want to publish my branch, it says "It looks like you don't have write access to kilianb / JImageHash". Did I miss something ? Should I create a fork instead, as proposed by gitHub ? |
Yes exactly, this is how git works . You create a fork (your own working copy of the code), which you are free to modify in any way you like. You then can make changes
And afterwards create a pull request (this can be done via the github ui). Due to this process no one is able to change the code of a repository without permission of the actual owner but since your version is also online everyone can just download your version and try it out as well as be able to see who made the changes afterwards. |
Thanks. Done, Sorry for my newbeeness. |
Hello,
I have an issue, not really a bug but maybe an improvement.
Here is the use case:
After investigation, I found it is because the following part in equals method:
if (getClass() != obj.getClass())
return false;
My Hash from step 1 is of class: com.github.kilianB.hashAlgorithms.DifferenceHash$DHash while the second one is of class: com.github.kilianB.hash.Hash.
I tried to cast the first one in (Hash) but it doesn't seems to view the object as it.
One way to solve this migh be to do something like this in equals method intead of using the .getClass():
if (!(obj instanceof Hash))
return false;
Cheers.
Matt
The text was updated successfully, but these errors were encountered: