Compute the hash code for this URLName.
()
| 470 | * Compute the hash code for this URLName. |
| 471 | */ |
| 472 | @Override |
| 473 | public int hashCode() { |
| 474 | if (hashCode != 0) |
| 475 | return hashCode; |
| 476 | if (protocol != null) |
| 477 | hashCode += protocol.hashCode(); |
| 478 | InetAddress addr = getHostAddress(); |
| 479 | if (addr != null) |
| 480 | hashCode += addr.hashCode(); |
| 481 | else if (host != null) |
| 482 | hashCode += host.toLowerCase(Locale.ENGLISH).hashCode(); |
| 483 | if (username != null) |
| 484 | hashCode += username.hashCode(); |
| 485 | if (file != null) |
| 486 | hashCode += file.hashCode(); |
| 487 | hashCode += port; |
| 488 | return hashCode; |
| 489 | } |
| 490 | |
| 491 | /** |
| 492 | * Get the IP address of our host. Look up the |
nothing calls this directly
no test coverage detected