@@ -142,7 +142,7 @@ public void addService(S service) {
142
142
}
143
143
144
144
public void addServiceInfo (ServiceInfo <S > serviceInfo ) {
145
- this .serviceMap .computeIfAbsent (serviceInfo .getCode (), ServiceGroup ::new ).add (serviceInfo );
145
+ this .serviceMap .computeIfAbsent (serviceInfo .getCode (). toLowerCase () , ServiceGroup ::new ).add (serviceInfo );
146
146
147
147
if (serviceInfo .isDefault () && !DEFAULT_SERVICE_CODE .equals (serviceInfo .getCode ())) {
148
148
this .serviceMap .computeIfAbsent (DEFAULT_SERVICE_CODE , ServiceGroup ::new ).add (serviceInfo );
@@ -157,15 +157,15 @@ public void addServiceList(List<S> serviceList) {
157
157
HashMap <String , List <ServiceInfo <S >>> map = new HashMap <>();
158
158
for (S service : serviceList ) {
159
159
ServiceInfo <S > serviceInfo = ServiceInfo .of (service );
160
- map .computeIfAbsent (serviceInfo .getCode (), k -> new ArrayList <>()).add (serviceInfo );
160
+ map .computeIfAbsent (serviceInfo .getCode (). toLowerCase () , k -> new ArrayList <>()).add (serviceInfo );
161
161
162
162
if (serviceInfo .isDefault () && !DEFAULT_SERVICE_CODE .equals (serviceInfo .getCode ())) {
163
163
map .computeIfAbsent (DEFAULT_SERVICE_CODE , k -> new ArrayList <>()).add (serviceInfo );
164
164
}
165
165
}
166
166
167
167
map .forEach ((code , serviceInfoList ) -> {
168
- ServiceGroup <S > group = this .serviceMap .computeIfAbsent (code , ServiceGroup ::new );
168
+ ServiceGroup <S > group = this .serviceMap .computeIfAbsent (code . toLowerCase () , ServiceGroup ::new );
169
169
group .addAll (serviceInfoList );
170
170
});
171
171
}
@@ -177,15 +177,15 @@ public void addServiceInfoList(List<ServiceInfo<S>> serviceInfoList) {
177
177
178
178
HashMap <String , List <ServiceInfo <S >>> map = new HashMap <>();
179
179
for (ServiceInfo <S > serviceInfo : serviceInfoList ) {
180
- map .computeIfAbsent (serviceInfo .getCode (), k -> new ArrayList <>()).add (serviceInfo );
180
+ map .computeIfAbsent (serviceInfo .getCode (). toLowerCase () , k -> new ArrayList <>()).add (serviceInfo );
181
181
182
182
if (serviceInfo .isDefault () && !DEFAULT_SERVICE_CODE .equals (serviceInfo .getCode ())) {
183
183
map .computeIfAbsent (DEFAULT_SERVICE_CODE , k -> new ArrayList <>()).add (serviceInfo );
184
184
}
185
185
}
186
186
187
187
map .forEach ((code , serviceInfoList0 ) -> {
188
- ServiceGroup <S > group = this .serviceMap .computeIfAbsent (code , ServiceGroup ::new );
188
+ ServiceGroup <S > group = this .serviceMap .computeIfAbsent (code . toLowerCase () , ServiceGroup ::new );
189
189
group .addAll (serviceInfoList0 );
190
190
});
191
191
}
0 commit comments