Skip to content

Commit

Permalink
v6.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
839128 committed Aug 15, 2022
1 parent ee87489 commit e4a39b3
Show file tree
Hide file tree
Showing 55 changed files with 242 additions and 331 deletions.
4 changes: 2 additions & 2 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.5.5-blue.svg?label=Maven%20Central" />
<img src="https://img.shields.io/badge/maven--central-v6.5.6-blue.svg?label=Maven%20Central" />
</a>
<a target="_blank" href="https://travis-ci.org/aoju/bus">
<img src="https://travis-ci.com/aoju/bus.svg?branch=main">
Expand Down Expand Up @@ -97,7 +97,7 @@ Bus (应用/服务总线) 是一个基础框架、服务套件,它基于Java17
<dependency>
<groupId>org.aoju</groupId>
<artifactId>bus-all</artifactId>
<version>6.5.5</version>
<version>6.5.6</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions 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.5.5</version>
<version>6.5.6</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down Expand Up @@ -223,7 +223,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
6 changes: 3 additions & 3 deletions 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.5.5</version>
<version>6.5.6</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down Expand Up @@ -42,7 +42,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.compiler.version>17</project.compiler.version>
<spring.boot.version>2.7.0</spring.boot.version>
<spring.boot.version>2.7.2</spring.boot.version>
<lombok.version>1.18.24</lombok.version>
<persistence.version>2.2</persistence.version>
</properties>
Expand Down Expand Up @@ -92,7 +92,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
4 changes: 2 additions & 2 deletions 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.5.5</version>
<version>6.5.6</version>
<packaging>pom</packaging>

<name>${project.artifactId}</name>
Expand Down Expand Up @@ -191,7 +191,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
19 changes: 9 additions & 10 deletions 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.5.5</version>
<version>6.5.6</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down Expand Up @@ -42,17 +42,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.compiler.version>17</project.compiler.version>
<spring.boot.version>2.7.0</spring.boot.version>
<spring.boot.version>2.7.2</spring.boot.version>
<lombok.version>1.18.24</lombok.version>
<guice.version>5.0.1</guice.version>
<jedis.version>4.2.2</jedis.version>
<guice.version>5.1.0</guice.version>
<jedis.version>4.2.3</jedis.version>
<xmemcached.version>2.4.7</xmemcached.version>
<ehcache.version>3.9.4</ehcache.version>
<curator.version>5.2.1</curator.version>
<ehcache.version>3.9.9</ehcache.version>
<curator.version>5.3.0</curator.version>
<guava.version>31.1-jre</guava.version>
<hession.version>4.0.65</hession.version>
<druid.version>1.2.8</druid.version>
<mysql.version>8.0.29</mysql.version>
<hession.version>4.0.66</hession.version>
<mysql.version>8.0.30</mysql.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -185,7 +184,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
2 changes: 1 addition & 1 deletion bus-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependency>
<groupId>org.aoju</groupId>
<artifactId>bus-core</artifactId>
<version>6.5.5</version>
<version>6.5.6</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions bus-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-core</artifactId>
<version>6.5.5</version>
<version>6.5.6</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down Expand Up @@ -68,7 +68,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
2 changes: 1 addition & 1 deletion bus-core/src/main/java/org/aoju/bus/core/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class Version {
* @return 项目的版本号
*/
public static String get() {
return "6.5.5.RELEASE";
return "6.5.6.RELEASE";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ public static DateTime parseUTC(String text) {
if (null == text) {
return null;
}
int length = text.length();
final int length = text.length();
if (StringKit.contains(text, 'Z')) {
if (length == Fields.UTC_PATTERN.length() - 4) {
// 格式类似:2020-09-11T06:34:32Z,-4表示减去4个单引号的长度
Expand Down
27 changes: 27 additions & 0 deletions bus-core/src/main/java/org/aoju/bus/core/toolkit/CollKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,33 @@ public static List<String> addAll(List<String> list, String part, boolean isTrim
return list;
}

/**
* 一个对象不为空且不存在于该集合中时,加入到该集合中
* <pre>
* null, null = false
* [], null = false
* null, "123" = false
* ["123"], "123" = false
* [], "123" => true
* ["456"], "123" = true
* [Animal{"name": "jack"}], Dog{"name": "jack"} = true
* </pre>
*
* @param collection 被加入的集合
* @param object 要添加到集合的对象
* @param <T> 集合元素类型
* @param <S> 要添加的元素类型【为集合元素类型的类型或子类型】
* @return 是否添加成功
* @author Cloud-Style
*/
public static <T, S extends T> boolean addIfAbsent(Collection<T> collection, S object) {
if (object == null || collection == null || collection.contains(object)) {
return false;
}

return collection.add(object);
}

/**
* 将另一个列表中的元素加入到列表中,如果列表中已经存在此元素则忽略之
*
Expand Down
48 changes: 24 additions & 24 deletions bus-core/src/main/java/org/aoju/bus/core/toolkit/RandomKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,30 @@ public static String randomString(int length) {
return randomString(Normal.LOWER_NUMBER, length);
}

/**
* 获得一个随机的字符串
*
* @param text 随机字符选取的样本
* @param length 字符串的长度
* @return 随机字符串
*/
public static String randomString(String text, int length) {
if (StringKit.isEmpty(text)) {
return Normal.EMPTY;
}
if (length < 1) {
length = 1;
}

final StringBuilder sb = new StringBuilder(length);
int baseLength = text.length();
for (int i = 0; i < length; i++) {
int number = randomInt(baseLength);
sb.append(text.charAt(number));
}
return sb.toString();
}

/**
* 获得一个随机的字符串(只包含数字和大写字符)
*
Expand Down Expand Up @@ -438,30 +462,6 @@ public static String randomNumbers(int length) {
return randomString(Normal.NUMBER, length);
}

/**
* 获得一个随机的字符串
*
* @param text 随机字符选取的样本
* @param length 字符串的长度
* @return 随机字符串
*/
public static String randomString(String text, int length) {
if (StringKit.isEmpty(text)) {
return Normal.EMPTY;
}
final StringBuilder sb = new StringBuilder(length);

if (length < 1) {
length = 1;
}
int baseLength = text.length();
for (int i = 0; i < length; i++) {
int number = randomInt(baseLength);
sb.append(text.charAt(number));
}
return sb.toString();
}

/**
* 随机数字,数字为0~9单个数字
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,12 @@ public static Object[] getFieldsValue(Object object) {

/**
* 设置字段值
* 若值类型与字段类型不一致,则会尝试通过 {@link Convert} 进行转换
* 若字段类型是原始类型而传入的值是 null,则会将字段设置为对应原始类型的默认值(见 {@link ClassKit#getDefaultValue(Class)})
*
* @param object 对象,static字段则此处传Class
* @param fieldName 字段名
* @param value 值,值类型必须与字段类型匹配,不会自动转换对象类型
* @param value 值,当值类型与字段类型不匹配时,会尝试转换
* @throws InstrumentException 包装IllegalAccessException异常
*/
public static void setFieldValue(Object object, String fieldName, Object value) throws InstrumentException {
Expand All @@ -592,10 +594,12 @@ public static void setFieldValue(Object object, String fieldName, Object value)

/**
* 设置字段值
* 若值类型与字段类型不一致,则会尝试通过 {@link Convert} 进行转换
* 若字段类型是原始类型而传入的值是 null,则会将字段设置为对应原始类型的默认值(见 {@link ClassKit#getDefaultValue(Class)})
*
* @param object 对象,如果是static字段,此参数为null
* @param field 字段
* @param value 值,值类型必须与字段类型匹配,不会自动转换对象类型
* @param value 值,当值类型与字段类型不匹配时,会尝试转换
* @throws InstrumentException UtilException 包装IllegalAccessException异常
*/
public static void setFieldValue(Object object, Field field, Object value) throws InstrumentException {
Expand Down
7 changes: 1 addition & 6 deletions bus-core/src/main/java/org/aoju/bus/core/toolkit/UriKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -1759,12 +1759,7 @@ public URL toURL(URLStreamHandler handler) {
*/
public URI toURI() {
try {
return new URI(
getSchemeWithDefault(),
getAuthority(),
getPathString(),
getQueryString(),
getFragmentEncoded());
return toURL().toURI();
} catch (URISyntaxException e) {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions bus-cron/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-cron</artifactId>
<version>6.5.5</version>
<version>6.5.6</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down Expand Up @@ -66,7 +66,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
4 changes: 2 additions & 2 deletions bus-crypto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-crypto</artifactId>
<version>6.5.5</version>
<version>6.5.6</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down Expand Up @@ -79,7 +79,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
Loading

0 comments on commit e4a39b3

Please sign in to comment.