diff --git a/src/main/java/com/flickr4java/flickr/Parameter.java b/src/main/java/com/flickr4java/flickr/Parameter.java index 7d0b62d..e292cc6 100644 --- a/src/main/java/com/flickr4java/flickr/Parameter.java +++ b/src/main/java/com/flickr4java/flickr/Parameter.java @@ -27,7 +27,7 @@ public Parameter(String name, Object value) { public Parameter(String name, long value) { this.name = name; - this.value = new Long(value); + this.value = value; } public String getName() { diff --git a/src/main/java/com/flickr4java/flickr/photos/Editability.java b/src/main/java/com/flickr4java/flickr/photos/Editability.java index 618229d..d8c4f0d 100644 --- a/src/main/java/com/flickr4java/flickr/photos/Editability.java +++ b/src/main/java/com/flickr4java/flickr/photos/Editability.java @@ -45,8 +45,8 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hash = 1; - hash += new Boolean(comment).hashCode(); - hash += new Boolean(addmeta).hashCode(); + hash += Boolean.hashCode(comment); + hash += Boolean.hashCode(addmeta); return hash; } diff --git a/src/main/java/com/flickr4java/flickr/photos/GeoData.java b/src/main/java/com/flickr4java/flickr/photos/GeoData.java index 85133a9..d7fc0b7 100644 --- a/src/main/java/com/flickr4java/flickr/photos/GeoData.java +++ b/src/main/java/com/flickr4java/flickr/photos/GeoData.java @@ -81,9 +81,9 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hash = 1; - hash += new Float(longitude).hashCode(); - hash += new Float(latitude).hashCode(); - hash += new Integer(accuracy).hashCode(); + hash += Float.hashCode(longitude); + hash += Float.hashCode(latitude); + hash += Integer.hashCode(accuracy); return hash; } } diff --git a/src/main/java/com/flickr4java/flickr/photos/Permissions.java b/src/main/java/com/flickr4java/flickr/photos/Permissions.java index 06dbe5c..239d7e9 100644 --- a/src/main/java/com/flickr4java/flickr/photos/Permissions.java +++ b/src/main/java/com/flickr4java/flickr/photos/Permissions.java @@ -103,11 +103,11 @@ public boolean equals(Object obj) { public int hashCode() { int hash = 87; hash += id.hashCode(); - hash += new Integer(comment).hashCode(); - hash += new Integer(addmeta).hashCode(); - hash += new Boolean(publicFlag).hashCode(); - hash += new Boolean(friendFlag).hashCode(); - hash += new Boolean(familyFlag).hashCode(); + hash += Integer.hashCode(comment); + hash += Integer.hashCode(addmeta); + hash += Boolean.hashCode(publicFlag); + hash += Boolean.hashCode(friendFlag); + hash += Boolean.hashCode(familyFlag); return hash; } } diff --git a/src/main/java/com/flickr4java/flickr/photos/Size.java b/src/main/java/com/flickr4java/flickr/photos/Size.java index 0d7a95f..5e06bcc 100644 --- a/src/main/java/com/flickr4java/flickr/photos/Size.java +++ b/src/main/java/com/flickr4java/flickr/photos/Size.java @@ -348,9 +348,9 @@ public boolean equals(Object obj) { public int hashCode() { int hash = 1; - hash += new Integer(label).hashCode(); - hash += new Integer(width).hashCode(); - hash += new Integer(height).hashCode(); + hash += Integer.hashCode(label); + hash += Integer.hashCode(width); + hash += Integer.hashCode(height); if (source != null) { hash += source.hashCode(); } diff --git a/src/main/java/com/flickr4java/flickr/stats/Domain.java b/src/main/java/com/flickr4java/flickr/stats/Domain.java index 299f1ed..07353fe 100644 --- a/src/main/java/com/flickr4java/flickr/stats/Domain.java +++ b/src/main/java/com/flickr4java/flickr/stats/Domain.java @@ -49,7 +49,7 @@ public void setViews(Long views) { public void setViews(String views) { try { - setViews(new Long(views)); + setViews(Long.valueOf(views)); } catch (NumberFormatException e) { // ignore and set value as null } diff --git a/src/main/java/com/flickr4java/flickr/stats/Referrer.java b/src/main/java/com/flickr4java/flickr/stats/Referrer.java index e64ac8c..936a252 100644 --- a/src/main/java/com/flickr4java/flickr/stats/Referrer.java +++ b/src/main/java/com/flickr4java/flickr/stats/Referrer.java @@ -49,7 +49,7 @@ public void setViews(Long views) { public void setViews(String views) { try { - setViews(new Long(views)); + setViews(Long.valueOf(views)); } catch (NumberFormatException e) { // ignore and set value as null } diff --git a/src/main/java/com/flickr4java/flickr/tags/Tag.java b/src/main/java/com/flickr4java/flickr/tags/Tag.java index 81354c3..3e01f31 100644 --- a/src/main/java/com/flickr4java/flickr/tags/Tag.java +++ b/src/main/java/com/flickr4java/flickr/tags/Tag.java @@ -90,7 +90,7 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hash = 1; - hash += new Integer(count).hashCode(); + hash += Integer.hashCode(count); if (value != null) { hash += value.hashCode(); }