mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -12,6 +12,7 @@ import cn.hutool.core.reflect.ClassUtil;
|
||||
import cn.hutool.core.reflect.ConstructorUtil;
|
||||
import cn.hutool.core.reflect.TypeUtil;
|
||||
import cn.hutool.core.text.StrUtil;
|
||||
import cn.hutool.core.text.split.SplitUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.CharUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
@@ -210,7 +211,7 @@ public final class InternalJSONUtil {
|
||||
* @param predicate 属性过滤器,{@link Predicate#test(Object)}为{@code true}保留
|
||||
*/
|
||||
public static void propertyPut(final JSONObject jsonObject, final Object key, final Object value, final Predicate<MutableEntry<String, Object>> predicate) {
|
||||
final String[] path = StrUtil.splitToArray(Convert.toStr(key), CharUtil.DOT);
|
||||
final String[] path = SplitUtil.splitToArray(Convert.toStr(key), StrUtil.DOT);
|
||||
final int last = path.length - 1;
|
||||
JSONObject target = jsonObject;
|
||||
for (int i = 0; i < last; i += 1) {
|
||||
|
@@ -6,7 +6,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.exceptions.ValidateException;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.text.StrUtil;
|
||||
import cn.hutool.core.util.CharUtil;
|
||||
import cn.hutool.core.text.split.SplitUtil;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.jwt.signers.AlgorithmUtil;
|
||||
@@ -423,7 +423,7 @@ public class JWT implements RegisteredPayload<JWT> {
|
||||
* @return 三部分内容
|
||||
*/
|
||||
private static List<String> splitToken(final String token) {
|
||||
final List<String> tokens = StrUtil.split(token, CharUtil.DOT);
|
||||
final List<String> tokens = SplitUtil.split(token, StrUtil.DOT);
|
||||
if (3 != tokens.size()) {
|
||||
throw new JWTException("The token was expected 3 parts, but got {}.", tokens.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user