pom
This commit is contained in:
23
pom.xml
23
pom.xml
@@ -16,13 +16,14 @@
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
|
||||
<junit.version>5.9.0</junit.version>
|
||||
<maven-plugin.version>3.2.0</maven-plugin.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
|
||||
<maven-jar-plugin.version>3.4.0</maven-jar-plugin.version>
|
||||
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
|
||||
<maven-source-plugin.version>3.2.0</maven-source-plugin.version>
|
||||
<maven-assembly-plugin.version>3.7.0</maven-assembly-plugin.version>
|
||||
<nexus-staging-plugin.version>1.7.0</nexus-staging-plugin.version>
|
||||
<maven-compiler-plugin.version>3.9.0</maven-compiler-plugin.version>
|
||||
<maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
|
||||
<maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version>
|
||||
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
|
||||
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
|
||||
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
|
||||
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
|
||||
<palantir-java-format.version>2.46.0</palantir-java-format.version>
|
||||
|
||||
@@ -170,12 +171,6 @@
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<gpgArguments>
|
||||
<arg>--pinentry-mode</arg>
|
||||
<arg>loopback</arg>
|
||||
</gpgArguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
@@ -183,7 +178,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-plugin.version}</version>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -196,7 +191,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>${maven-plugin.version}</version>
|
||||
<version>${maven-assembly-plugin.version}</version>
|
||||
<configuration>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
|
||||
@@ -149,10 +149,6 @@ public class RetResult<T> implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public static RetResult<Map<String, String>> map(String... items) {
|
||||
return new RetResult(Utility.ofMap(items));
|
||||
}
|
||||
|
||||
public static <K, V> RetResult<Map<K, V>> map(Object... items) {
|
||||
return new RetResult(Utility.ofMap(items));
|
||||
}
|
||||
|
||||
@@ -475,7 +475,7 @@ public final class CacheMemorySource extends AbstractCacheSource {
|
||||
if (keyVals.length % 2 != 0) {
|
||||
throw new SourceException("key value must be paired");
|
||||
}
|
||||
return msetnx(Utility.ofMap(keyVals));
|
||||
return msetnx(Utility.ofMap((Object[]) keyVals));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
*/
|
||||
package org.redkale.util;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.invoke.*;
|
||||
import java.lang.reflect.*;
|
||||
@@ -15,6 +13,7 @@ import java.net.http.HttpClient;
|
||||
import java.nio.*;
|
||||
import java.nio.channels.CompletionHandler;
|
||||
import java.nio.charset.*;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import java.security.*;
|
||||
import java.time.*;
|
||||
import java.util.*;
|
||||
@@ -1534,21 +1533,6 @@ public final class Utility {
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将多个key:value的字符串键值对组合成一个Map,items长度必须是偶数, 参数个数若是奇数的话,最后一个会被忽略 类似 JDK9中的 Map.of 方法
|
||||
*
|
||||
* @param items 键值对
|
||||
* @return Map
|
||||
*/
|
||||
public static HashMap<String, String> ofMap(String... items) {
|
||||
HashMap<String, String> map = new LinkedHashMap<>(Math.max(1, items.length / 2));
|
||||
int len = items.length / 2;
|
||||
for (int i = 0; i < len; i++) {
|
||||
map.put(items[i * 2], items[i * 2 + 1]);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将多个key:value对应值组合成一个Map,items长度必须是偶数, 参数个数若是奇数的话,最后一个会被忽略 类似 JDK9中的 Map.of 方法
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user