修复 sa-token-solon-plugin 模块代码警告

This commit is contained in:
click33 2023-05-16 15:38:01 +08:00
parent b1e7f8471e
commit 3b52c09b01
7 changed files with 12 additions and 10 deletions

View File

@ -16,7 +16,6 @@
package cn.dev33.satoken.solon.dao;
import org.noear.redisx.RedisClient;
import org.noear.solon.annotation.Note;
import java.util.Properties;
@ -35,4 +34,5 @@ public class SaTokenDaoOfRedis extends SaTokenDaoOfRedisBase64 {
public SaTokenDaoOfRedis(RedisClient redisClient) {
super(redisClient);
}
}

View File

@ -157,7 +157,7 @@ public class SaTokenDaoOfRedisBase64 implements SaTokenDao {
@Override
public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType) {
Set<String> keys = redisBucket.keys(prefix + "*" + keyword + "*");
List<String> list = new ArrayList<String>(keys);
List<String> list = new ArrayList<>(keys);
return SaFoxUtil.searchList(list, start, size, sortType);
}
}

View File

@ -174,7 +174,7 @@ public class SaTokenDaoOfRedisJson implements SaTokenDao {
@Override
public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType) {
Set<String> keys = redisBucket.keys(prefix + "*" + keyword + "*");
List<String> list = new ArrayList<String>(keys);
List<String> list = new ArrayList<>(keys);
return SaFoxUtil.searchList(list, start, size, sortType);
}
}

View File

@ -24,9 +24,9 @@ package cn.dev33.satoken.solon.error;
public interface SaSolonErrorCode {
/** 默认的拦截器异常处理函数 */
public static final int CODE_20301 = 20301;
int CODE_20301 = 20301;
/** 默认的 Filter 异常处理函数 */
public static final int CODE_20302 = 20302;
int CODE_20302 = 20302;
}

View File

@ -34,9 +34,9 @@ import java.util.List;
/**
* sa-token 基于路由的过滤式鉴权增加了注解的处理使用优先级要低些
*
* <p>
* 对静态文件有处理效果
*
* <p>
* order: -100 (SaTokenInterceptor SaTokenFilter 二选一不要同时用)
*
* @author noear
@ -152,6 +152,7 @@ public class SaTokenFilter implements SaFilter, Filter { //之所以改名,为
}
});
} catch (StopMatchException e) {
// StopMatchException 异常代表停止匹配进入Controller
} catch (SaTokenException e) {
// 1. 获取异常处理策略结果

View File

@ -34,9 +34,9 @@ import java.util.List;
/**
* sa-token 基于路由的过滤式鉴权增加了注解的处理使用优先级要低些
*
* <p>
* 对静态文件无处理效果
*
* <p>
* order: -100 (SaTokenInterceptor SaTokenFilter 二选一不要同时用)
*
* @author noear
@ -201,6 +201,7 @@ public class SaTokenInterceptor implements RouterInterceptor {
}
});
} catch (StopMatchException e) {
// StopMatchException 异常代表停止匹配进入Controller
} catch (SaTokenException e) {
// 1. 获取异常处理策略结果

View File

@ -80,7 +80,7 @@ public class SaRequestForSolon implements SaRequest {
@Override
public String getUrl() {
String currDomain = SaManager.getConfig().getCurrDomain();
if(SaFoxUtil.isEmpty(currDomain) == false) {
if( ! SaFoxUtil.isEmpty(currDomain)) {
return currDomain + this.getRequestPath();
}
return ctx.url();