Skip to content

Commit

Permalink
v6.2.2
Browse files Browse the repository at this point in the history
v6.2.2
  • Loading branch information
839128 authored Mar 25, 2021
2 parents 04ee87e + a65b99b commit 30c91fb
Show file tree
Hide file tree
Showing 2,843 changed files with 8,362 additions and 7,656 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</p>
<p align="center">
<a target="_blank" href="https://search.maven.org/search?q=org.aoju">
<img src="https://img.shields.io/badge/maven--central-v6.2.1-blue.svg?label=Maven%20Central" />
<img src="https://img.shields.io/badge/maven--central-v6.2.2-blue.svg?label=Maven%20Central" />
</a>
<a target="_blank" href="https://travis-ci.org/aoju/bus">
<img src="https://travis-ci.org/aoju/bus.svg?branch=master">
Expand Down Expand Up @@ -97,7 +97,7 @@ Bus (应用/服务总线) 是一个基础框架、服务套件,它基于Java8
<dependency>
<groupId>org.aoju</groupId>
<artifactId>bus-all</artifactId>
<version>6.2.1</version>
<version>6.2.2</version>
</dependency>
```

Expand All @@ -114,7 +114,7 @@ Bus (应用/服务总线) 是一个基础框架、服务套件,它基于Java8
### Gradle

```
implementation 'org.aoju:bus-all:6.2.1'
implementation 'org.aoju:bus-all:6.2.2'
```

### Downlad
Expand Down
2 changes: 1 addition & 1 deletion bus-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-all</artifactId>
<version>6.2.1</version>
<version>6.2.2</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion bus-all/src/main/java/org/aoju/bus/Bus.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* </p>
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public class Bus extends Version {
Expand Down
2 changes: 1 addition & 1 deletion bus-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-base</artifactId>
<version>6.2.1</version>
<version>6.2.2</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* 异常信息拦截处理
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@ControllerAdvice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* 公共常量
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public class Consts extends Normal {
Expand Down
16 changes: 8 additions & 8 deletions bus-base/src/main/java/org/aoju/bus/base/consts/ErrorCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* 系统响应码
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public class ErrorCode {
Expand Down Expand Up @@ -114,13 +114,13 @@ public class ErrorCode {
register(EM_100109, "缺少language参数");
register(EM_100110, "缺少fields参数");
register(EM_100111, "缺少format参数");
register(EM_100112, "code错误");
register(EM_100113, "code过期");
register(EM_100114, "缺少sign参数");
register(EM_100115, "缺少noncestr参数");
register(EM_100116, "缺少timestamp参数");
register(EM_100117, "缺少sign");
register(EM_100118, "token过期");
register(EM_100112, "缺少sign参数");
register(EM_100113, "缺少noncestr参数");
register(EM_100114, "缺少timestamp参数");
register(EM_100115, "缺少sign");
register(EM_100116, "当前令牌已过期");
register(EM_100117, "当前账号已登录");
register(EM_100118, "无效的签名");
register(EM_100200, "请使用GET请求");
register(EM_100201, "请使用POST请求");
register(EM_100202, "请使用PUT请求");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* Entity 基本信息.
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Data
Expand Down Expand Up @@ -212,7 +212,7 @@ public <T> boolean isPKNotNull(T entity, String field) {
return false;
}
Object value = ReflectKit.getFieldValue(entity, field);
return value != null && !Normal.EMPTY.equals(value);
return null != value && !Normal.EMPTY.equals(value);
}

/**
Expand All @@ -225,7 +225,7 @@ public <T> boolean isPKNotNull(T entity, String field) {
private <T> Object getValue(T entity, String field) {
if (ReflectKit.hasField(entity, field)) {
Object object = ReflectKit.invokeGetter(entity, field);
return object != null ? object.toString() : null;
return null != object ? object.toString() : null;
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* Entity 实体
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* 返回值公用类
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* 授权公用类
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Data
Expand Down
4 changes: 2 additions & 2 deletions bus-base/src/main/java/org/aoju/bus/base/entity/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* 返回结果公用
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Data
Expand All @@ -57,7 +57,7 @@ public Result(int total, List<T> rows) {
}

public Result(List<T> rows, int pageSize) {
if (rows == null || rows.isEmpty()) {
if (null == rows || rows.isEmpty()) {
throw new IllegalArgumentException("data must be not empty!");
}
new Result<>(rows, rows.size(), pageSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* 访问链路跟踪
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* BaseMapper 接口
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public interface BaseMapper<T> extends Mapper<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* CoreMapper 接口
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public interface Mapper<T> extends org.aoju.bus.mapper.common.Mapper<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* BaseService 接口
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public interface BaseService<T> extends Service {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Service 接口
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public interface Service {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* BaseService 接口实现
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public class BaseServiceImpl<Mapper extends BaseMapper<T>, T extends BaseEntity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* 基础请求封装
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public class BaseController<Service extends BaseService<T>, T> extends Controller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* 基础输出封装
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public class Controller {
Expand Down
2 changes: 1 addition & 1 deletion bus-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-bom</artifactId>
<version>6.2.1</version>
<version>6.2.2</version>
<packaging>pom</packaging>

<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Object func(@CacheKey("#arg0[#i]") List<Long> ids){
<dependency>
<groupId>org.aoju.bus</groupId>
<artifactId>bus-cache</artifactId>
<version>6.2.1</version>
<version>6.2.2</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion bus-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-cache</artifactId>
<version>6.2.1</version>
<version>6.2.2</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/CacheX.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* 缓存接口
*
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public interface CacheX {
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/Complex.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

/**
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Singleton
Expand Down
4 changes: 2 additions & 2 deletions bus-cache/src/main/java/org/aoju/bus/cache/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/**
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public class Context {
Expand All @@ -56,7 +56,7 @@ public static Context newConfig(Map<String, CacheX> caches) {
}

public boolean isPreventOn() {
return prevent != null && prevent == Switch.ON;
return null != prevent && prevent == Switch.ON;
}

public Map<String, CacheX> getCaches() {
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/Hitting.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/**
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
public interface Hitting {
Expand Down
16 changes: 7 additions & 9 deletions bus-cache/src/main/java/org/aoju/bus/cache/Manage.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,21 @@

/**
* @author Kimi Liu
* @version 6.2.1
* @version 6.2.2
* @since JDK 1.8+
*/
@Singleton
public class Manage {

// defaultCache和cachePool直接使用Pair实现, 减小new Object的损耗
/**
* defaultCache和cachePool直接使用Pair实现, 减小new Object的损耗
*/
private CachePair<String, CacheX> defaultCache;

private Map<String, CachePair<String, CacheX>> cachePool = new ConcurrentHashMap<>();

@Inject
public void setCachePool(Map<String, CacheX> caches) {
// default cache impl
Map.Entry<String, CacheX> entry = caches.entrySet().iterator().next();
this.defaultCache = CachePair.of(entry.getKey(), entry.getValue());

Expand All @@ -76,7 +77,7 @@ public Object readSingle(String cache, String key) {
}

public void writeSingle(String cache, String key, Object value, int expire) {
if (value != null) {
if (null != value) {
try {
CachePair<String, CacheX> cacheImpl = getCacheImpl(cache);

Expand Down Expand Up @@ -111,21 +112,18 @@ public CacheKeys readBatch(String cache, Collection<String> keys) {
Set<String> notHitKeys = new LinkedHashSet<>();
for (String key : keys) {
Object value = cacheMap.get(key);

if (value == null) {
if (null == value) {
notHitKeys.add(key);
} else {
hitValueMap.put(key, value);
}
}

cacheKeys = new CacheKeys(hitValueMap, notHitKeys);
} catch (Throwable e) {
Logger.error("read multi cache failed, keys: {}", keys, e);
cacheKeys = new CacheKeys();
}
}

return cacheKeys;
}

Expand All @@ -145,7 +143,7 @@ public void writeBatch(String cache, Map<String, Object> keyValueMap, int expire
}

public void remove(String cache, String... keys) {
if (keys != null && keys.length != 0) {
if (null != keys && keys.length != 0) {
try {
CachePair<String, CacheX> cacheImpl = getCacheImpl(cache);

Expand Down
Loading

0 comments on commit 30c91fb

Please sign in to comment.