Skip to content

Commit 7af92b4

Browse files
jhoellerunknown
authored and
unknown
committed
Fixed HierarchicalUriComponents equals implementation
Issue: SPR-10088
1 parent d4c5583 commit 7af92b4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* Extension of {@link UriComponents} for hierarchical URIs.
3939
*
4040
* @author Arjen Poutsma
41-
* @since 3.2
41+
* @since 3.1.3
4242
* @see <a href="http://tools.ietf.org/html/rfc3986#section-1.2.3">Hierarchical URIs</a>
4343
*/
4444
final class HierarchicalUriComponents extends UriComponents {
@@ -421,12 +421,10 @@ public boolean equals(Object obj) {
421421
if (this == obj) {
422422
return true;
423423
}
424-
if (!(obj instanceof OpaqueUriComponents)) {
424+
if (!(obj instanceof HierarchicalUriComponents)) {
425425
return false;
426426
}
427-
428427
HierarchicalUriComponents other = (HierarchicalUriComponents) obj;
429-
430428
if (ObjectUtils.nullSafeEquals(getScheme(), other.getScheme())) {
431429
return false;
432430
}
@@ -448,7 +446,6 @@ public boolean equals(Object obj) {
448446
if (ObjectUtils.nullSafeEquals(getFragment(), other.getFragment())) {
449447
return false;
450448
}
451-
452449
return true;
453450
}
454451

0 commit comments

Comments
 (0)