Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
looly committed Feb 13, 2022
2 parents 4fa050c + ee0013d commit 19001e2
Show file tree
Hide file tree
Showing 125 changed files with 2,807 additions and 401 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,38 @@
# 🚀Changelog

-------------------------------------------------------------------------------------------------------------
# 5.7.21 (2022-02-14)

### 🐣新特性
* 【extra 】 增加jetbrick模板支持
* 【extra 】 EmojiUtil增加方法(pr#519@Gitee)
* 【core 】 DateUtil 添加两个日期是否同一周方法(pr#516@Gitee)
* 【db 】 新增条件组,用于处理复杂的where条件(pr#514@Gitee)
* 【core 】 新增LocalDateTimeUtil.weekOfYear(issue#I4RWXC@Gitee)
* 【core 】 Month增加toJdkMonth、getValueBaseOne
* 【core 】 CsvWriter修改规则,去除末尾多余换行符(issue#I4RSQY@Gitee)
* 【core 】 DateUtil增加rangeFunc和rangeConsume(issue#I4RSQY@Gitee)
* 【core 】 DateTime增加setUseJdkToStringStyle方法
* 【core 】 CharSequenceUtil增加replace重载(issue#2122@Github)
* 【core 】 IntMap和LongMap使用位运算快速求解取余运算(pr#2123@Github)
* 【core 】 新增通用builder类:GenericBuilder(pr#526@Gitee)
* 【core 】 新增copySafely方法与mkdirsSafely方法(pr#527@Gitee)
* 【core 】 新增MetroHash(pr#532@Gitee)
* 【core 】 SpringUtil增加publishEvent重载(pr#2139@Github)
* 【core 】 DateUtil增加rangeContains、rangeNotContains(pr#537@Gitee)
* 【core 】 Resource增加isModified默认方法
* 【core 】 增加VfsResource
* 【json 】 JSONConfig增加setKeyComparator、setNatureKeyComparator方法,支持自定义排序(issue#I4RBZ4@Gitee)

### 🐞Bug修复
* 【core 】 修复ChineseDate农历获取正月出现数组越界BUG(issue#2112@Github)
* 【extra 】 修复EmojiUtil.toHtmlHex()方法(pr#519@Gitee)
* 【system 】 修复CpuInfo.getUsed()方法(issue#2116@Github)
* 【dfa 】 修复密集匹配和贪婪匹配冲突问题(issue#2126@Github)
* 【db 】 修复c3p0丢失信息问题(issue#I4T7XZ@Gitee)
* 【http 】 修复Action中HttpExchange没有关闭问题

-------------------------------------------------------------------------------------------------------------
# 5.7.20 (2022-01-20)

### 🐣新特性
Expand Down
8 changes: 4 additions & 4 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a target="_blank" href="https://search.maven.org/artifact/cn.hutool/hutool-all">
<img src="https://img.shields.io/maven-central/v/cn.hutool/hutool-all.svg?label=Maven%20Central" />
</a>
<a target="_blank" href="https://license.coscl.org.cn/MulanPSL2/">
<a target="_blank" href="http://license.coscl.org.cn/MulanPSL2/index.html">
<img src="https://img.shields.io/:license-MulanPSL2-blue.svg" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
Expand Down Expand Up @@ -142,18 +142,18 @@ We provide the T-Shirt and Sweater with Hutool Logo, please visit the shop:
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</dependency>
```

### 🍐Gradle
```
implementation 'cn.hutool:hutool-all:5.7.20'
implementation 'cn.hutool:hutool-all:5.7.21'
```

## 📥Download

- [Maven Repo](https://repo1.maven.org/maven2/cn/hutool/hutool-all/5.7.20/)
- [Maven Repo](https://repo1.maven.org/maven2/cn/hutool/hutool-all/5.7.21/)

> 🔔️note:
> Hutool 5.x supports JDK8+ and is not tested on Android platforms, and cannot guarantee that all tool classes or tool methods are available.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a target="_blank" href="https://search.maven.org/artifact/cn.hutool/hutool-all">
<img src="https://img.shields.io/maven-central/v/cn.hutool/hutool-all.svg?label=Maven%20Central" />
</a>
<a target="_blank" href="https://license.coscl.org.cn/MulanPSL2/">
<a target="_blank" href="http://license.coscl.org.cn/MulanPSL2/index.html">
<img src="https://img.shields.io/:license-MulanPSL2-blue.svg" />
</a>
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
Expand Down Expand Up @@ -142,20 +142,20 @@ Hutool的存在就是为了减少代码搜索成本,避免网络上参差不
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</dependency>
```

### 🍐Gradle
```
implementation 'cn.hutool:hutool-all:5.7.20'
implementation 'cn.hutool:hutool-all:5.7.21'
```

### 📥下载jar

点击以下链接,下载`hutool-all-X.X.X.jar`即可:

- [Maven中央库](https://repo1.maven.org/maven2/cn/hutool/hutool-all/5.7.20/)
- [Maven中央库](https://repo1.maven.org/maven2/cn/hutool/hutool-all/5.7.21/)

> 🔔️注意
> Hutool 5.x支持JDK8+,对Android平台没有测试,不能保证所有工具类或工具方法可用。
Expand Down
2 changes: 1 addition & 1 deletion bin/logo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ echo ' / /_/ // / / // __// __ \ / __ \ / / '
echo ' / __ // /_/ // /_ / /_/ // /_/ // / '
echo '/_/ /_/ \____/ \__/ \____/ \____//_/ '
echo ''
echo '-----------http://hutool.cn/------------'
echo '-----------https://hutool.cn/-----------'
echo '========================================'
2 changes: 1 addition & 1 deletion bin/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.7.20
5.7.21
2 changes: 1 addition & 1 deletion docs/js/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var version = '5.7.20'
var version = '5.7.21'
2 changes: 1 addition & 1 deletion hutool-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</parent>

<artifactId>hutool-all</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions hutool-aop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</parent>

<artifactId>hutool-aop</artifactId>
Expand All @@ -19,7 +19,7 @@
<properties>
<!-- versions -->
<cglib.version>3.3.0</cglib.version>
<spring.version>5.3.14</spring.version>
<spring.version>5.3.15</spring.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion hutool-bloomFilter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</parent>

<artifactId>hutool-bloomFilter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ public IntMap(int size) {
@Override
public void add(long i) {
int r = (int) (i / BitMap.MACHINE32);
int c = (int) (i % BitMap.MACHINE32);
int c = (int) (i & (BitMap.MACHINE32 - 1));
ints[r] = ints[r] | (1 << c);
}

@Override
public boolean contains(long i) {
int r = (int) (i / BitMap.MACHINE32);
int c = (int) (i % BitMap.MACHINE32);
int c = (int) (i & (BitMap.MACHINE32 - 1));
return ((ints[r] >>> c) & 1) == 1;
}

@Override
public void remove(long i) {
int r = (int) (i / BitMap.MACHINE32);
int c = (int) (i % BitMap.MACHINE32);
int c = (int) (i & (BitMap.MACHINE32 - 1));
ints[r] &= ~(1 << c);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ public LongMap(int size) {
@Override
public void add(long i) {
int r = (int) (i / BitMap.MACHINE64);
long c = i % BitMap.MACHINE64;
long c = i & (BitMap.MACHINE64 - 1);
longs[r] = longs[r] | (1L << c);
}

@Override
public boolean contains(long i) {
int r = (int) (i / BitMap.MACHINE64);
long c = i % BitMap.MACHINE64;
long c = i & (BitMap.MACHINE64 - 1);
return ((longs[r] >>> c) & 1) == 1;
}

@Override
public void remove(long i) {
int r = (int) (i / BitMap.MACHINE64);
long c = i % BitMap.MACHINE64;
long c = i & (BitMap.MACHINE64 - 1);
longs[r] &= ~(1L << c);
}

}
}
2 changes: 1 addition & 1 deletion hutool-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</parent>

<artifactId>hutool-bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion hutool-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</parent>

<artifactId>hutool-cache</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion hutool-captcha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</parent>

<artifactId>hutool-captcha</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion hutool-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.7.20</version>
<version>5.7.21</version>
</parent>

<artifactId>hutool-core</artifactId>
Expand Down
16 changes: 13 additions & 3 deletions hutool-core/src/main/java/cn/hutool/core/bean/BeanDescCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/**
* Bean属性缓存<br>
* 缓存用于防止多次反射造成的性能问题
* @author Looly
*
* @author Looly
*/
public enum BeanDescCache {
INSTANCE;
Expand All @@ -16,12 +16,22 @@ public enum BeanDescCache {

/**
* 获得属性名和{@link BeanDesc}Map映射
*
* @param beanClass Bean的类
* @param supplier 对象不存在时创建对象的函数
* @param supplier 对象不存在时创建对象的函数
* @return 属性名和{@link BeanDesc}映射
* @since 5.4.2
*/
public BeanDesc getBeanDesc(Class<?> beanClass, Func0<BeanDesc> supplier){
public BeanDesc getBeanDesc(Class<?> beanClass, Func0<BeanDesc> supplier) {
return bdCache.get(beanClass, supplier);
}

/**
* 清空全局的Bean属性缓存
*
* @since 5.7.21
*/
public void clear() {
this.bdCache.clear();
}
}
10 changes: 10 additions & 0 deletions hutool-core/src/main/java/cn/hutool/core/bean/BeanInfoCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ public void putPropertyDescriptorMap(Class<?> beanClass, Map<String, PropertyDes
getCache(ignoreCase).put(beanClass, fieldNamePropertyDescriptorMap);
}

/**
* 清空缓存
*
* @since 5.7.21
*/
public void clear() {
this.pdCache.clear();
this.ignoreCasePdCache.clear();
}

/**
* 根据是否忽略字段名的大小写,返回不用Cache对象
*
Expand Down
Loading

0 comments on commit 19001e2

Please sign in to comment.