Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #53 from ngriso/master

TFJ-666 Stop calling URL.hashcode()
  • Loading branch information...
commit aaa0f9a9ac5eac6841f95da337239d024c02d7a2 2 parents 8821e57 + 54aff64
Yusuke Yamamoto authored
8 twitter4j-core/src/main/java/twitter4j/internal/json/URLEntityJSONImpl.java
View
@@ -144,9 +144,9 @@ public boolean equals(Object o) {
if (start != that.start) return false;
if (displayURL != null ? !displayURL.equals(that.displayURL) : that.displayURL != null)
return false;
- if (expandedURL != null ? !expandedURL.equals(that.expandedURL) : that.expandedURL != null)
+ if (expandedURL != null ? !expandedURL.toString().equalsIgnoreCase(that.expandedURL.toString()) : that.expandedURL != null)
return false;
- if (url != null ? !url.equals(that.url) : that.url != null)
+ if (url != null ? !url.toString().equalsIgnoreCase(that.url.toString()) : that.url != null)
return false;
return true;
@@ -156,8 +156,8 @@ public boolean equals(Object o) {
public int hashCode() {
int result = start;
result = 31 * result + end;
- result = 31 * result + (url != null ? url.hashCode() : 0);
- result = 31 * result + (expandedURL != null ? expandedURL.hashCode() : 0);
+ result = 31 * result + (url != null ? url.toString().hashCode() : 0);
+ result = 31 * result + (expandedURL != null ? expandedURL.toString().hashCode() : 0);
result = 31 * result + (displayURL != null ? displayURL.hashCode() : 0);
return result;
}
Please sign in to comment.
Something went wrong with that request. Please try again.