File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
dubbo-common/src/main/java/org/apache/dubbo/common/url/component Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -890,15 +890,17 @@ public boolean equals(Object o) {
890890 @ Override
891891 public int hashCode () {
892892 if (hashCodeCache == -1 ) {
893+ int result = 1 ;
893894 for (Map .Entry <String , String > entry : EXTRA_PARAMS .entrySet ()) {
894895 if (!TIMESTAMP_KEY .equals (entry .getKey ())) {
895- hashCodeCache = hashCodeCache * 31 + Objects .hashCode (entry );
896+ result += entry .hashCode ();
896897 }
897898 }
898- for (Integer value : VALUE ) {
899- hashCodeCache = hashCodeCache * 31 + value ;
900- }
901- hashCodeCache = hashCodeCache * 31 + ((KEY == null ) ? 0 : KEY .hashCode ());
899+
900+ result = 31 * result + Arrays .hashCode (VALUE );
901+ result = 31 * result + ((KEY == null ) ? 0 : KEY .hashCode ());
902+
903+ hashCodeCache = result ;
902904 }
903905 return hashCodeCache ;
904906 }
You can’t perform that action at this time.
0 commit comments