diff --git a/src/main/java/com/alibaba/druid/support/http/util/IPAddress.java b/src/main/java/com/alibaba/druid/support/http/util/IPAddress.java
index b0a3b34ce1..a6e2917c8d 100644
--- a/src/main/java/com/alibaba/druid/support/http/util/IPAddress.java
+++ b/src/main/java/com/alibaba/druid/support/http/util/IPAddress.java
@@ -269,15 +269,12 @@ public class IPAddress implements Cloneable {
return result;
}
+
+ public int hashCode () {
+ return this.ipAddress;
+ }
- // -------------------------------------------------------------------------
- /**
- * Compare the specified IP address to the encapsulated one.
- *
- * @param another The IP address to be compared.
- * @return Return true if the encapsulated IP address is the same as the specified one, otherwise
- * return false.
- */
+
public boolean equals(Object another) {
if (another instanceof IPAddress) {
return ipAddress == ((IPAddress) another).ipAddress;
@@ -285,12 +282,7 @@ public class IPAddress implements Cloneable {
return false;
}
- // -------------------------------------------------------------------------
- /**
- * Clone the encapsulated IP address.
- *
- * @return Return a new object representing the encapsulated IP address.
- */
+
public Object clone() {
return new IPAddress(ipAddress);
}