mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
修复 sa-token-solon-plugin 模块代码警告
This commit is contained in:
parent
b1e7f8471e
commit
3b52c09b01
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
||||
|
@ -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. 获取异常处理策略结果
|
||||
|
@ -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. 获取异常处理策略结果
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user