sonarqube质量修复

This commit is contained in:
gaoqr
2024-10-08 16:52:56 +08:00
parent 4fe3cfda62
commit 73b4051641
41 changed files with 151 additions and 4400 deletions
@@ -1,22 +0,0 @@
package com.cf.imes.framework.common.core;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* Key Value 的键值对
*
* @author 晨丰科技
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class KeyValue<K, V> implements Serializable {
private K key;
private V value;
}
@@ -1,7 +1,7 @@
package com.cf.imes.framework.common.util.collection;
import cn.hutool.core.collection.CollUtil;
import com.cf.imes.framework.common.core.KeyValue;
import cn.hutool.core.lang.Pair;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
@@ -56,7 +56,7 @@ public class MapUtils {
consumer.accept(value);
}
public static <K, V> Map<K, V> convertMap(List<KeyValue<K, V>> keyValues) {
public static <K, V> Map<K, V> convertMap(List<Pair<K, V>> keyValues) {
Map<K, V> map = Maps.newLinkedHashMapWithExpectedSize(keyValues.size());
keyValues.forEach(keyValue -> map.put(keyValue.getKey(), keyValue.getValue()));
return map;