equal
deleted
inserted
replaced
954 // we see if the original names/IPs passed in were equal. |
954 // we see if the original names/IPs passed in were equal. |
955 |
955 |
956 String thisHost = hostname; |
956 String thisHost = hostname; |
957 String thatHost = that.hostname; |
957 String thatHost = that.hostname; |
958 |
958 |
959 if (thisHost == null) |
959 if (thisHost == null) { |
960 return false; |
960 return false; |
961 else |
961 } else if (this.wildcard) { |
|
962 final int cnameLength = this.cname.length(); |
|
963 return thatHost.regionMatches(true, |
|
964 (thatHost.length() - cnameLength), |
|
965 this.cname, 0, cnameLength); |
|
966 } else { |
962 return thisHost.equalsIgnoreCase(thatHost); |
967 return thisHost.equalsIgnoreCase(thatHost); |
|
968 } |
963 } |
969 } |
964 |
970 |
965 /** |
971 /** |
966 * Checks two SocketPermission objects for equality. |
972 * Checks two SocketPermission objects for equality. |
967 * <P> |
973 * <P> |