File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
spring-webmvc/src/main/java/org/springframework/web/servlet Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import org .springframework .util .LinkedMultiValueMap ;
22
22
import org .springframework .util .MultiValueMap ;
23
+ import org .springframework .util .ObjectUtils ;
23
24
import org .springframework .util .StringUtils ;
24
25
25
26
/**
@@ -146,6 +147,29 @@ public int compareTo(FlashMap other) {
146
147
}
147
148
}
148
149
150
+ @ Override
151
+ public boolean equals (Object obj ) {
152
+ if (this == obj ) {
153
+ return true ;
154
+ }
155
+ if (obj != null && obj instanceof FlashMap ) {
156
+ FlashMap other = (FlashMap ) obj ;
157
+ if (this .targetRequestParams .equals (other .targetRequestParams ) &&
158
+ ObjectUtils .nullSafeEquals (this .targetRequestPath , other .targetRequestPath )) {
159
+ return true ;
160
+ }
161
+ }
162
+ return false ;
163
+ }
164
+
165
+ @ Override
166
+ public int hashCode () {
167
+ int result = super .hashCode ();
168
+ result = 31 * result + (this .targetRequestPath != null ? this .targetRequestPath .hashCode () : 0 );
169
+ result = 31 * result + this .targetRequestParams .hashCode ();
170
+ return result ;
171
+ }
172
+
149
173
@ Override
150
174
public String toString () {
151
175
StringBuilder sb = new StringBuilder ();
You can’t perform that action at this time.
0 commit comments