mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
7.0.0.M1
This commit is contained in:
parent
22d487624d
commit
038a6ca0c8
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1,4 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [Looly]
|
||||
custom: ['https://gitee.com/dromara/hutool', 'https://dromara.gitee.io/donate.html']
|
||||
custom: ['https://gitee.com/chinabugotech/hutool']
|
||||
|
38
README-EN.md
38
README-EN.md
@ -33,11 +33,11 @@
|
||||
<a target="_blank" href='https://gitee.com/dromara/hutool/stargazers'>
|
||||
<img src='https://gitee.com/dromara/hutool/badge/star.svg?theme=gvp' alt='star'/>
|
||||
</a>
|
||||
<a target="_blank" href='https://github.com/dromara/hutool'>
|
||||
<img src="https://img.shields.io/github/stars/dromara/hutool.svg?style=social" alt="github star"/>
|
||||
<a target="_blank" href='https://github.com/chinabugotech/hutool'>
|
||||
<img src="https://img.shields.io/github/stars/chinabugotech/hutool.svg?style=social" alt="github star"/>
|
||||
</a>
|
||||
<a target="_blank" href='https://gitcode.com/dromara/hutool'>
|
||||
<img src="https://gitcode.com/dromara/hutool/star/badge.svg" alt="gitcode star"/>
|
||||
<a target="_blank" href='https://gitcode.com/chinabugotech/hutool'>
|
||||
<img src="https://gitcode.com/chinabugotech/hutool/star/badge.svg" alt="gitcode star"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@ -126,32 +126,32 @@ Each module can be introduced individually, or all modules can be introduced by
|
||||
### 🍊Maven
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.dromara.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>6.0.0-M22</version>
|
||||
<groupId>cn.hutool.v7</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>7.0.0.M1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### 🍐Gradle
|
||||
```
|
||||
implementation 'org.dromara.hutool:hutool-all:6.0.0-M22'
|
||||
implementation 'cn.hutool.v7:hutool-all:7.0.0.M1'
|
||||
```
|
||||
|
||||
## 📥Download
|
||||
|
||||
- [Maven Repo](https://repo1.maven.org/maven2/cn/hutool/hutool-all/6.0.0-M22/)
|
||||
- [Maven Repo](https://repo1.maven.org/maven2/cn/hutool/v7/hutool-all/7.0.0.M1/)
|
||||
|
||||
> 🔔️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.
|
||||
> Hutool 7.x supports JDK17 and is not tested on Android platforms, and cannot guarantee that all tool classes or tool methods are available.
|
||||
> If your project uses JDK7, please use Hutool 4.x version.
|
||||
|
||||
### 🚽Compile and install
|
||||
|
||||
Download the entire project source code
|
||||
|
||||
gitee:[https://gitee.com/dromara/hutool](https://gitee.com/dromara/hutool)
|
||||
gitee:[https://gitee.com/chinabugotech/hutool](https://gitee.com/chinabugotech/hutool)
|
||||
|
||||
github:[https://github.com/dromara/hutool](https://github.com/dromara/hutool)
|
||||
github:[https://github.com/chinabugotech/hutool](https://github.com/chinabugotech/hutool)
|
||||
|
||||
```sh
|
||||
cd ${hutool}
|
||||
@ -168,16 +168,16 @@ Hutool's source code is divided into two branches:
|
||||
|
||||
| branch | description |
|
||||
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| v6-master | The master branch, the branch used by the release version, is the same as the jar committed to the central repository and does not receive any pr or modifications. |
|
||||
| v6-dev | Development branch, which defaults to the next SNAPSHOT version, accepts modifications or pr |
|
||||
| v7-master | The master branch, the branch used by the release version, is the same as the jar committed to the central repository and does not receive any pr or modifications. |
|
||||
| v7-dev | Development branch, which defaults to the next SNAPSHOT version, accepts modifications or pr |
|
||||
|
||||
### 🐞Provide feedback or suggestions on bugs
|
||||
|
||||
When submitting feedback, please indicate which JDK version, Hutool version, and related dependency library version you are using.
|
||||
|
||||
- [Gitee issue](https://gitee.com/dromara/hutool/issues)
|
||||
- [Github issue](https://github.com/dromara/hutool/issues)
|
||||
- [Gitcode issue](https://gitcode.com/dromara/hutool/issues)
|
||||
- [Gitee issue](https://gitee.com/chinabugotech/hutool/issues)
|
||||
- [Github issue](https://github.com/chinabugotech/hutool/issues)
|
||||
- [Gitcode issue](https://gitcode.com/chinabugotech/hutool/issues)
|
||||
|
||||
### 🧬Principles of PR(pull request)
|
||||
|
||||
@ -186,13 +186,13 @@ Hutool welcomes anyone to contribute code to Hutool, but the author suffers from
|
||||
1. Improve the comments, especially each new method should follow the Java documentation specification to indicate the method description, parameter description, return value description and other information, if necessary, please add unit tests, if you want, you can also add your name.
|
||||
2. Code indentation according to Eclipse.
|
||||
3. Newly added methods do not use third-party library methods,Unless the method tool is add to the '**extra module**'.
|
||||
4. Please pull request to the `v6-dev` branch. Hutool uses a new branch after 5.x: `v6-master` is the master branch, which indicates the version of the central library that has been released, and this branch does not allow pr or modifications.
|
||||
4. Please pull request to the `v7-dev` branch. Hutool uses a new branch after 7.x: `v7-master` is the master branch, which indicates the version of the central library that has been released, and this branch does not allow pr or modifications.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## ⭐Star Hutool
|
||||
|
||||
[](https://starchart.cc/dromara/hutool)
|
||||
[](https://starchart.cc/chinabugotech/hutool)
|
||||
|
||||
## 📌WeChat Official Account
|
||||
|
||||
|
45
README.md
45
README.md
@ -30,14 +30,14 @@
|
||||
<a target="_blank" href="https://gitter.im/hutool/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
|
||||
<img alt="" src="https://badges.gitter.im/hutool/Lobby.svg" />
|
||||
</a>
|
||||
<a target="_blank" href='https://gitee.com/dromara/hutool/stargazers'>
|
||||
<img alt="star" src='https://gitee.com/dromara/hutool/badge/star.svg?theme=gvp'/>
|
||||
<a target="_blank" href='https://gitee.com/chinabugotech/hutool/stargazers'>
|
||||
<img alt="star" src='https://gitee.com/chinabugotech/hutool/badge/star.svg'/>
|
||||
</a>
|
||||
<a target="_blank" href='https://github.com/dromara/hutool'>
|
||||
<a target="_blank" href='https://github.com/chinabugotech/hutool'>
|
||||
<img alt="github star" src="https://img.shields.io/github/stars/dromara/hutool.svg?style=social"/>
|
||||
</a>
|
||||
<a target="_blank" href='https://gitcode.com/dromara/hutool'>
|
||||
<img src="https://gitcode.com/dromara/hutool/star/badge.svg" alt="gitcode star"/>
|
||||
<a target="_blank" href='https://gitcode.com/chinabugotech/hutool'>
|
||||
<img src="https://gitcode.com/chinabugotech/hutool/star/badge.svg" alt="gitcode star"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@ -77,13 +77,14 @@
|
||||
|
||||
### ✨版本选择
|
||||
|
||||
Hutool目前主要版本4.x、5.x、6.x,选择如下:
|
||||
Hutool目前主要版本4.x、5.x、6.x、7.x,选择如下:
|
||||
|
||||
| 版本 | jdk| Maven仓库 | 主要特点 |
|
||||
|-----|----|--------------------------------------------------------------------------------------------------------|-------------------------------------|
|
||||
| 版本 | jdk | Maven仓库 | 主要特点 |
|
||||
|-----|--------|--------------------------------------------------------------------------------------------------------|-------------------------------------|
|
||||
| 4.x | jdk1.7 | [cn.hutool/hutool-all/4.x](https://mvnrepository.com/artifact/cn.hutool/hutool-all/4.6.17) | jdk1.7编译 |
|
||||
| 5.x | jdk1.8 | [cn.hutool/hutool-all/5.x ](https://mvnrepository.com/artifact/cn.hutool/hutool-all) | jdk1.8编译,使用JavaEE,适配JDK11、17、21 |
|
||||
| 6.x | jdk1.8 | [org.dromara.hutool/hutool-all/6.x ](https://mvnrepository.com/artifact/org.dromara.hutool/hutool-all) | jdk1.8编译,使用Jakarta EE,适配JDK11、17、21 |
|
||||
| 7.x | jdk17 | [cn.hutool.v7/hutool-all/6.x ](https://mvnrepository.com/artifact/org.dromara.hutool/hutool-all) | jdk17编译,使用Jakarta EE,适配JDK11、17、21 |
|
||||
|
||||
## 🛠️包含组件
|
||||
|
||||
@ -128,30 +129,30 @@ Hutool目前主要版本4.x、5.x、6.x,选择如下:
|
||||
```xml
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.hutool</groupId>
|
||||
<groupId>cn.hutool.v7</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>6.0.0-M22</version>
|
||||
<version>7.0.0.M1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### 🍐Gradle
|
||||
|
||||
```
|
||||
implementation 'org.dromara.hutool:hutool-all:6.0.0-M22'
|
||||
implementation 'cn.hutool.v7:hutool-all:7.0.0.M1'
|
||||
```
|
||||
|
||||
### 📥下载jar
|
||||
|
||||
点击以下链接,下载`hutool-all-X.X.X.jar`即可:
|
||||
|
||||
- [Maven中央库](https://repo1.maven.org/maven2/org/dromara/hutool/hutool-all/6.0.0-M22/)
|
||||
- [Maven中央库](https://repo1.maven.org/maven2/cn/hutool/v7/hutool-all/7.0.0.M1/)
|
||||
|
||||
> 🔔️注意
|
||||
> Hutool 6.x支持JDK8+,对Android平台没有测试,不能保证所有工具类或工具方法可用。
|
||||
> Hutool 7.x支持JDK17,对Android平台没有测试,不能保证所有工具类或工具方法可用。
|
||||
|
||||
### 🚽编译安装
|
||||
|
||||
访问Hutool的Gitee主页:[https://gitee.com/dromara/hutool](https://gitee.com/dromara/hutool)
|
||||
访问Hutool的Gitee主页:[https://gitee.com/chinabugotech/hutool](https://gitee.com/chinabugotech/hutool)
|
||||
下载整个项目源码(v6-master或v6-dev分支都可)然后进入Hutool项目目录执行:
|
||||
|
||||
```sh
|
||||
@ -170,23 +171,23 @@ Hutool的源码分为两个分支,功能如下:
|
||||
|
||||
| 分支 | 作用 |
|
||||
|-----------|--------------------------------------------|
|
||||
| v6-master | 主分支,release版本使用的分支,与中央库提交的jar一致,不接收任何pr或修改 |
|
||||
| v6-dev | 开发分支,默认为下个版本的SNAPSHOT版本,接受修改或pr |
|
||||
| v7-master | 主分支,release版本使用的分支,与中央库提交的jar一致,不接收任何pr或修改 |
|
||||
| v7-dev | 开发分支,默认为下个版本的SNAPSHOT版本,接受修改或pr |
|
||||
|
||||
### 🐞提供bug反馈或建议
|
||||
|
||||
提交问题反馈请说明正在使用的JDK版本呢、Hutool版本和相关依赖库版本。
|
||||
|
||||
- [Gitee issue](https://gitee.com/dromara/hutool/issues)
|
||||
- [Github issue](https://github.com/dromara/hutool/issues)
|
||||
- [Gitcode issue Gitcode问题](https://gitcode.com/dromara/hutool/issues)
|
||||
- [Gitee issue](https://gitee.com/chinabugotech/hutool/issues)
|
||||
- [Github issue](https://github.com/chinabugotech/hutool/issues)
|
||||
- [Gitcode issue Gitcode问题](https://gitcode.com/chinabugotech/hutool/issues)
|
||||
|
||||
### 🧬贡献代码的步骤
|
||||
|
||||
1. 在Gitee、Github或Gitcode上fork项目到自己的repo
|
||||
2. 把fork过去的项目也就是你的项目clone到你的本地
|
||||
3. 修改代码(记得一定要修改v6-dev分支)
|
||||
4. commit后push到自己的库(v6-dev分支)
|
||||
3. 修改代码(记得一定要修改v7-dev分支)
|
||||
4. commit后push到自己的库(v7-dev分支)
|
||||
5. 登录Gitee、Github或Gitcode在你首页可以看到一个 pull request 按钮,点击它,填写一些说明信息,然后提交即可。
|
||||
6. 等待维护者合并
|
||||
|
||||
@ -209,7 +210,7 @@ Hutool欢迎任何人为Hutool添砖加瓦,贡献代码,不过维护者是
|
||||
|
||||
## ⭐Star Hutool
|
||||
|
||||
[](https://starchart.cc/dromara/hutool)[](https://starchart.cc/dromara/hutool)
|
||||
[](https://starchart.cc/chinabugotech/hutool)
|
||||
|
||||
### GitHub Contributor Over Time
|
||||
[](https://git-contributor.com?chart=contributorOverTime&repo=dromara/hutool)
|
||||
|
@ -33,7 +33,7 @@
|
||||
<description>
|
||||
Hutool是一个功能丰富且易用的Java工具库,通过诸多实用工具类的使用,旨在帮助开发者快速、便捷地完成各类开发任务。这些封装的工具涵盖了字符串、数字、集合、编码、日期、文件、IO、加密、数据库JDBC、JSON、HTTP客户端等一系列操作,可以满足各种不同的开发需求。
|
||||
</description>
|
||||
<url>https://github.com/dromara/hutool</url>
|
||||
<url>https://github.com/chinabugotech/hutool</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<artifactId>hutool-bom</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>提供丰富的Java工具方法,此模块为Hutool所有模块汇总,最终形式为拆分开的多个jar包,可以通过exclude方式排除不需要的模块</description>
|
||||
<url>https://github.com/dromara/hutool</url>
|
||||
<url>https://github.com/chinabugotech/hutool</url>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
@ -1560,7 +1560,7 @@ public class CollUtil {
|
||||
final String arrayStr = StrUtil.unWrap((CharSequence) value, '[', ']');
|
||||
iter = SplitUtil.splitTrim(arrayStr, StrUtil.COMMA).iterator();
|
||||
} else if (value instanceof Map && BeanUtil.isWritableBean(TypeUtil.getClass(elementType))) {
|
||||
//https://github.com/dromara/hutool/issues/3139
|
||||
//https://github.com/chinabugotech/hutool/issues/3139
|
||||
// 如果值为Map,而目标为一个Bean,则Map应整体转换为Bean,而非拆分成Entry转换
|
||||
iter = new ArrayIter<>(new Object[]{value});
|
||||
} else {
|
||||
|
@ -196,7 +196,7 @@ public class TemporalAccessorConverter extends AbstractConverter {
|
||||
|
||||
final Instant instant;
|
||||
if (DateFormatManager.FORMAT_SECONDS.equals(this.format)) {
|
||||
// https://gitee.com/dromara/hutool/issues/I6IS5B
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I6IS5B
|
||||
// Unix时间戳
|
||||
instant = Instant.ofEpochSecond(time);
|
||||
} else {
|
||||
|
@ -186,7 +186,7 @@ public class UUID implements java.io.Serializable, Comparable<UUID> {
|
||||
|
||||
/**
|
||||
* 获取随机生成的UUIDv7<br>
|
||||
* 【开源之夏】贡献内容,见:https://gitee.com/dromara/hutool/pulls/1263
|
||||
* 【开源之夏】贡献内容,见:https://gitee.com/chinabugotech/hutool/pulls/1263
|
||||
*
|
||||
* @return UUIDv7
|
||||
* @author Cason(https://gitee.com/Casonhqc)
|
||||
|
@ -131,7 +131,7 @@ public class LambdaFactory {
|
||||
* 通过Lambda函数代理方法或构造
|
||||
* <p>
|
||||
* TODO 在多模块项目中,使用module-info.java声明的模块项目,使用此方法获取的Lookup对象存在权限不足问题<br>
|
||||
* 见:https://gitee.com/dromara/hutool/issues/I96JIP
|
||||
* 见:https://gitee.com/chinabugotech/hutool/issues/I96JIP
|
||||
* </p>
|
||||
*
|
||||
* @param funcType 函数类型
|
||||
|
@ -34,7 +34,7 @@ import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 复制jdk16中的Optional,以及自己进行了一点调整和新增,比jdk8中的Optional多了几个实用的函数<br>
|
||||
* 详细见:<a href="https://gitee.com/dromara/hutool/pulls/426"></a>
|
||||
* 详细见:<a href="https://gitee.com/chinabugotech/hutool/pulls/426"></a>
|
||||
*
|
||||
* @param <T> 包裹里元素的类型
|
||||
* @author VampireAchao
|
||||
|
@ -25,7 +25,7 @@ import java.util.List;
|
||||
* 平滑加权轮询选择器
|
||||
*
|
||||
* <p>
|
||||
* 来自:https://gitee.com/dromara/hutool/pulls/982/
|
||||
* 来自:https://gitee.com/chinabugotech/hutool/pulls/982/
|
||||
* </p>
|
||||
* <p>
|
||||
* 介绍:https://cloud.tencent.com/developer/beta/article/1680928
|
||||
|
@ -81,7 +81,7 @@ public class BitStatusUtil {
|
||||
* <li>必须大于0</li>
|
||||
* <li>必须为偶数</li>
|
||||
* </ul>
|
||||
* 原因见:https://github.com/dromara/hutool/pull/3706
|
||||
* 原因见:https://github.com/chinabugotech/hutool/pull/3706
|
||||
*
|
||||
* @param args 被检查的状态
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@ import java.util.Stack;
|
||||
|
||||
/**
|
||||
* 数学表达式计算工具类<br>
|
||||
* 见:https://github.com/dromara/hutool/issues/1090#issuecomment-693750140
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/1090#issuecomment-693750140
|
||||
*
|
||||
* @author trainliang, Looly
|
||||
* @since 5.4.3
|
||||
|
@ -27,7 +27,7 @@ import java.util.Currency;
|
||||
/**
|
||||
* 单币种货币类,处理货币算术、币种和取整。
|
||||
* <p>
|
||||
* 感谢提供此方法的用户:https://github.com/dromara/hutool/issues/605
|
||||
* 感谢提供此方法的用户:https://github.com/chinabugotech/hutool/issues/605
|
||||
*
|
||||
* <p>
|
||||
* 货币类中封装了货币金额和币种。目前金额在内部是long类型表示,
|
||||
|
@ -306,7 +306,7 @@ public class NumberUtil extends NumberValidator {
|
||||
public static BigDecimal div(final Number v1, final Number v2, int scale, final RoundingMode roundingMode) {
|
||||
Assert.notNull(v2, "Divisor must be not null !");
|
||||
if (null == v1 || isZero(v1)) {
|
||||
// https://gitee.com/dromara/hutool/issues/I6UZYU
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I6UZYU
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ public class Ipv4Util implements Ipv4Pool {
|
||||
* <p>
|
||||
* 此方法不会抛出异常,获取失败将返回{@code null}<br>
|
||||
* <p>
|
||||
* 见:https://github.com/dromara/hutool/issues/428
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/428
|
||||
*
|
||||
* @return 本机网卡IP地址,获取失败返回{@code null}
|
||||
*/
|
||||
@ -129,7 +129,7 @@ public class Ipv4Util implements Ipv4Pool {
|
||||
* <p>
|
||||
* 此方法不会抛出异常,获取失败将返回{@code null}<br>
|
||||
* <p>
|
||||
* 见:https://github.com/dromara/hutool/issues/428
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/428
|
||||
*
|
||||
* @return 本机网卡IP地址,获取失败返回{@code null}
|
||||
*/
|
||||
@ -149,7 +149,7 @@ public class Ipv4Util implements Ipv4Pool {
|
||||
* <p>
|
||||
* 此方法不会抛出异常,获取失败将返回{@code null}<br>
|
||||
* <p>
|
||||
* 见:https://github.com/dromara/hutool/issues/428
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/428
|
||||
*
|
||||
* @param includeSiteLocal 是否包含局域网地址,如10.0.0.0 ~ 10.255.255.255、172.16.0.0 ~ 172.31.255.255、192.168.0.0 ~ 192.168.255.255
|
||||
* @return 本机网卡IP地址,获取失败返回{@code null}
|
||||
|
@ -168,7 +168,7 @@ public class Ipv6Util {
|
||||
* <p>
|
||||
* 此方法不会抛出异常,获取失败将返回{@code null}<br>
|
||||
* <p>
|
||||
* 见:https://github.com/dromara/hutool/issues/428
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/428
|
||||
*
|
||||
* @return 本机网卡IP地址,获取失败返回{@code null}
|
||||
*/
|
||||
|
@ -424,7 +424,7 @@ public class NetUtil {
|
||||
* <p>
|
||||
* 此方法不会抛出异常,获取失败将返回{@code null}<br>
|
||||
* <p>
|
||||
* 见:https://github.com/dromara/hutool/issues/428
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/428
|
||||
*
|
||||
* @return 本机网卡IP地址,获取失败返回{@code null}
|
||||
*/
|
||||
|
@ -158,9 +158,9 @@ public interface RegexPool {
|
||||
* 中国车牌号码(兼容新能源车牌)
|
||||
*/
|
||||
String PLATE_NUMBER =
|
||||
//https://gitee.com/dromara/hutool/issues/I1B77H?from=project-issue
|
||||
//https://gitee.com/chinabugotech/hutool/issues/I1B77H?from=project-issue
|
||||
"^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[ABCDEFGHJK])|([ABCDEFGHJK]([A-HJ-NP-Z0-9])[0-9]{4})))|" +
|
||||
//https://gitee.com/dromara/hutool/issues/I1BJHE?from=project-issue
|
||||
//https://gitee.com/chinabugotech/hutool/issues/I1BJHE?from=project-issue
|
||||
"([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]\\d{3}\\d{1,3}[领])|" +
|
||||
"([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$";
|
||||
|
||||
|
@ -807,7 +807,7 @@ public class ArrayUtilTest {
|
||||
|
||||
@Test
|
||||
public void insertPrimitiveTest() {
|
||||
// https://gitee.com/dromara/hutool/pulls/874
|
||||
// https://gitee.com/chinabugotech/hutool/pulls/874
|
||||
|
||||
final boolean[] booleans = new boolean[10];
|
||||
final byte[] bytes = new byte[10];
|
||||
|
@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
|
||||
public class BeanCopyMappingTest {
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I4C48U <br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I4C48U <br>
|
||||
* 传递复制不要用注解别名,应该用动态映射
|
||||
*/
|
||||
@Test
|
||||
|
@ -301,7 +301,7 @@ public class BeanUtilTest {
|
||||
final SubPersonWithAlias subPersonWithAlias = BeanUtil.toBean(map, SubPersonWithAlias.class);
|
||||
assertEquals("sub名字", subPersonWithAlias.getSubName());
|
||||
|
||||
// https://gitee.com/dromara/hutool/issues/I6H0XF
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I6H0XF
|
||||
// is_booleana并不匹配booleana字段
|
||||
assertFalse(subPersonWithAlias.isBooleana());
|
||||
Assertions.assertNull(subPersonWithAlias.getBooleanb());
|
||||
@ -569,7 +569,7 @@ public class BeanUtilTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://github.com/dromara/hutool/issues/1173">#1173</a>
|
||||
* <a href="https://github.com/chinabugotech/hutool/issues/1173">#1173</a>
|
||||
*/
|
||||
@Test
|
||||
public void beanToBeanOverlayFieldTest() {
|
||||
@ -661,7 +661,7 @@ public class BeanUtilTest {
|
||||
|
||||
@Test
|
||||
public void copyBeanPropertiesFunctionFilterTest() {
|
||||
//https://gitee.com/dromara/hutool/pulls/590
|
||||
//https://gitee.com/chinabugotech/hutool/pulls/590
|
||||
final Person o = new Person();
|
||||
o.setName("asd");
|
||||
o.setAge(123);
|
||||
@ -982,7 +982,7 @@ public class BeanUtilTest {
|
||||
|
||||
@Test
|
||||
public void valueProviderToBeanTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I5B4R7
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I5B4R7
|
||||
final CopyOptions copyOptions = CopyOptions.of();
|
||||
final Map<String, String> filedMap= new HashMap<>();
|
||||
filedMap.put("name", "sourceId");
|
||||
@ -1007,7 +1007,7 @@ public class BeanUtilTest {
|
||||
|
||||
@Test
|
||||
public void hasGetterTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I6M7Z7
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I6M7Z7
|
||||
final boolean b = BeanUtil.hasGetter(Object.class);
|
||||
assertFalse(b);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/1687
|
||||
* https://github.com/chinabugotech/hutool/issues/1687
|
||||
*/
|
||||
public class Issue1687Test {
|
||||
|
||||
|
@ -20,7 +20,7 @@ import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/2009
|
||||
* https://github.com/chinabugotech/hutool/issues/2009
|
||||
*/
|
||||
public class Issue2009Test {
|
||||
|
||||
|
@ -21,7 +21,7 @@ import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/2082<br>
|
||||
* https://github.com/chinabugotech/hutool/issues/2082<br>
|
||||
* 当setXXX有重载方法的时候,BeanDesc中会匹配到重载方法,增加类型检查来规避之
|
||||
*/
|
||||
public class Issue2082Test {
|
||||
|
@ -28,7 +28,7 @@ import java.util.Map;
|
||||
public class Issue2202Test {
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/2202
|
||||
* https://github.com/chinabugotech/hutool/issues/2202
|
||||
*/
|
||||
@Test
|
||||
public void mapToBeanWithFieldNameEditorTest(){
|
||||
|
@ -25,7 +25,7 @@ public class Issue3096Test {
|
||||
void beanDescTest() {
|
||||
final BeanDesc desc = BeanUtil.getBeanDesc(User.class);
|
||||
|
||||
// https://github.com/dromara/hutool/issues/3096
|
||||
// https://github.com/chinabugotech/hutool/issues/3096
|
||||
// 新修改的规则中,isLastPage字段优先匹配setIsLastPage,这个顺序固定。
|
||||
// 只有setIsLastPage不存在时,才匹配setLastPage
|
||||
Assertions.assertEquals("setLastPage", desc.getSetter("lastPage").getName());
|
||||
|
@ -23,7 +23,7 @@ import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I8MEIX<br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I8MEIX<br>
|
||||
* get操作非原子
|
||||
*/
|
||||
public class IssueI8MEIXTest {
|
||||
|
@ -28,7 +28,7 @@ import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* 见:<a href="https://github.com/dromara/hutool/issues/1895">https://github.com/dromara/hutool/issues/1895</a><br>
|
||||
* 见:<a href="https://github.com/chinabugotech/hutool/issues/1895">https://github.com/chinabugotech/hutool/issues/1895</a><br>
|
||||
* 并发问题测试,在5.7.15前,LRUCache存在并发问题,多线程get后,map结构变更,导致null的位置不确定,
|
||||
* 并可能引起死锁。
|
||||
*/
|
||||
@ -37,7 +37,7 @@ public class LRUCacheTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void putTest(){
|
||||
//https://github.com/dromara/hutool/issues/2227
|
||||
//https://github.com/chinabugotech/hutool/issues/2227
|
||||
final LRUCache<String, String> cache = CacheUtil.newLRUCache(100, 10);
|
||||
for (int i = 0; i < 10000; i++) {
|
||||
//ThreadUtil.execute(()-> cache.put(RandomUtil.randomString(5), "1243", 10));
|
||||
|
@ -41,7 +41,7 @@ public class WeakCacheTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void removeByGcTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I51O7M
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I51O7M
|
||||
final WeakCache<String, String> cache = new WeakCache<>(-1);
|
||||
cache.put("a", "1");
|
||||
cache.put("b", "2");
|
||||
|
@ -37,7 +37,7 @@ public class ClassLoaderUtilTest {
|
||||
|
||||
@Test
|
||||
public void isPresentTest() {
|
||||
final boolean present = ClassLoaderUtil.isPresent("cn.hutool.v7.core.classloader.core.ClassLoaderUtil");
|
||||
final boolean present = ClassLoaderUtil.isPresent("cn.hutool.v7.core.classloader.ClassLoaderUtil");
|
||||
Assertions.assertTrue(present);
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/pulls/532
|
||||
* https://gitee.com/chinabugotech/hutool/pulls/532
|
||||
*/
|
||||
public class MetroHashTest {
|
||||
|
||||
|
@ -895,7 +895,7 @@ public class CollUtilTest {
|
||||
|
||||
@Test
|
||||
public void setValueByMapTest() {
|
||||
// https://gitee.com/dromara/hutool/pulls/482
|
||||
// https://gitee.com/chinabugotech/hutool/pulls/482
|
||||
final List<Person> people = Arrays.asList(
|
||||
new Person("aa", 12, "man", 1),
|
||||
new Person("bb", 13, "woman", 2),
|
||||
|
@ -32,7 +32,7 @@ import java.util.List;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/pulls/1240
|
||||
* https://gitee.com/chinabugotech/hutool/pulls/1240
|
||||
*/
|
||||
public class IndexedComparatorTest {
|
||||
@Test
|
||||
|
@ -27,7 +27,7 @@ public class IssueI5DRU0Test {
|
||||
@Test
|
||||
@Disabled
|
||||
public void appendTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I5DRU0
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I5DRU0
|
||||
// 向zip中添加文件的时候,如果添加的文件的父目录已经存在,会报错。实际中目录存在忽略即可。
|
||||
ZipUtil.append(Paths.get("d:/test/zipTest.zip"), Paths.get("d:/test/zipTest"), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/IAGYDG
|
||||
* https://gitee.com/chinabugotech/hutool/issues/IAGYDG
|
||||
*/
|
||||
public class IssueIAGYDGTest {
|
||||
@Test
|
||||
|
@ -170,7 +170,7 @@ public class ZipUtilTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void zipStreamTest(){
|
||||
//https://github.com/dromara/hutool/issues/944
|
||||
//https://github.com/chinabugotech/hutool/issues/944
|
||||
final String dir = "d:/test";
|
||||
final String zip = "d:/test.zip";
|
||||
try (final OutputStream out = PathUtil.getOutputStream(Paths.get(zip))){
|
||||
@ -184,7 +184,7 @@ public class ZipUtilTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void zipStreamTest2(){
|
||||
// https://github.com/dromara/hutool/issues/944
|
||||
// https://github.com/chinabugotech/hutool/issues/944
|
||||
final String file1 = "d:/test/a.txt";
|
||||
final String file2 = "d:/test/a.txt";
|
||||
final String file3 = "d:/test/asn1.key";
|
||||
@ -234,7 +234,7 @@ public class ZipUtilTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void unzipTest3() {
|
||||
// https://github.com/dromara/hutool/issues/3018
|
||||
// https://github.com/chinabugotech/hutool/issues/3018
|
||||
ZipUtil.unzip("d:/test/default.zip", "d:/test/");
|
||||
}
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ public class ConvertTest {
|
||||
|
||||
@Test
|
||||
public void toBigDecimalTest(){
|
||||
// https://github.com/dromara/hutool/issues/1818
|
||||
// https://github.com/chinabugotech/hutool/issues/1818
|
||||
final String str = "33020000210909112800000124";
|
||||
final BigDecimal bigDecimal = ConvertUtil.toBigDecimal(str);
|
||||
assertEquals(str, bigDecimal.toPlainString());
|
||||
@ -420,7 +420,7 @@ public class ConvertTest {
|
||||
|
||||
@Test
|
||||
public void toFloatTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I4M0E4
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4M0E4
|
||||
final String hex2 = "CD0CCB43";
|
||||
final byte[] value = HexUtil.decode(hex2);
|
||||
final float f = ConvertUtil.toFloat(value);
|
||||
|
@ -20,7 +20,7 @@ import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/3105
|
||||
* https://github.com/chinabugotech/hutool/issues/3105
|
||||
*/
|
||||
public class Issue3105Test {
|
||||
@Test
|
||||
|
@ -40,7 +40,7 @@ public class CalendarUtilTest {
|
||||
final Calendar calendar = CalendarUtil.parse("2021-09-27 00:00:112323",
|
||||
DateFormatPool.NORM_DATETIME_FORMAT, false);
|
||||
|
||||
// https://github.com/dromara/hutool/issues/1849
|
||||
// https://github.com/chinabugotech/hutool/issues/1849
|
||||
// 在使用严格模式时,秒不正确,抛出异常
|
||||
DateUtil.date(calendar);
|
||||
});
|
||||
|
@ -137,7 +137,7 @@ public class ChineseDateTest {
|
||||
|
||||
@Test
|
||||
public void getChineseMonthTest2(){
|
||||
//https://github.com/dromara/hutool/issues/2112
|
||||
//https://github.com/chinabugotech/hutool/issues/2112
|
||||
final ChineseDate springFestival = new ChineseDate(Objects.requireNonNull(DateUtil.parse("2022-02-01")));
|
||||
final String chineseMonth = springFestival.getChineseMonth();
|
||||
Assertions.assertEquals("正月", chineseMonth);
|
||||
@ -145,7 +145,7 @@ public class ChineseDateTest {
|
||||
|
||||
@Test
|
||||
public void day19700101Test(){
|
||||
// https://gitee.com/dromara/hutool/issues/I4UTPK
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4UTPK
|
||||
Date date = DateUtil.parse("1970-01-01");
|
||||
//noinspection ConstantConditions
|
||||
ChineseDate chineseDate = new ChineseDate(date);
|
||||
@ -173,7 +173,7 @@ public class ChineseDateTest {
|
||||
|
||||
@Test
|
||||
public void getGregorianDateTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I4ZSGJ
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4ZSGJ
|
||||
ChineseDate chineseDate = new ChineseDate(1998, 5, 1);
|
||||
Assertions.assertEquals("1998-06-24 00:00:00", chineseDate.getGregorianDate().toString());
|
||||
|
||||
|
@ -973,7 +973,7 @@ public class DateUtilTest {
|
||||
@Test
|
||||
public void parseNotFitTest() {
|
||||
Assertions.assertThrows(DateException.class, ()->{
|
||||
//https://github.com/dromara/hutool/issues/1332
|
||||
//https://github.com/chinabugotech/hutool/issues/1332
|
||||
// 在日期格式不匹配的时候,测试是否正常报错
|
||||
DateUtil.parse("2020-12-23", DateFormatPool.PURE_DATE_PATTERN);
|
||||
});
|
||||
|
@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
public class Issue2981Test {
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/2981<br>
|
||||
* https://github.com/chinabugotech/hutool/issues/2981<br>
|
||||
* 按照ISO8601规范,以Z结尾表示UTC时间,否则为当地时间
|
||||
*/
|
||||
@SuppressWarnings("DataFlowIssue")
|
||||
|
@ -24,7 +24,7 @@ import java.util.Calendar;
|
||||
public class Issue3011Test {
|
||||
@Test
|
||||
public void isSameMonthTest() {
|
||||
// https://github.com/dromara/hutool/issues/3011
|
||||
// https://github.com/chinabugotech/hutool/issues/3011
|
||||
// 判断是否同一个月,还需考虑公元前和公元后的的情况
|
||||
// 此处公元前2020年和公元2021年返回年都是2021
|
||||
final Calendar calendar1 = Calendar.getInstance();
|
||||
|
@ -25,7 +25,7 @@ import java.util.concurrent.TimeUnit;
|
||||
public class StopWatchTest {
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I6HSBG
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I6HSBG
|
||||
*/
|
||||
@Test
|
||||
public void prettyPrintTest() {
|
||||
|
@ -50,7 +50,7 @@ public class ZodiacTest {
|
||||
|
||||
@Test
|
||||
public void getZodiacOutOfRangeTest() {
|
||||
// https://github.com/dromara/hutool/issues/3036
|
||||
// https://github.com/chinabugotech/hutool/issues/3036
|
||||
Assertions.assertThrows(IllegalArgumentException.class, ()-> DateUtil.getZodiac(Month.UNDECIMBER.getValue(), 10));
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import java.util.Date;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I8IUTB
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I8IUTB
|
||||
*/
|
||||
public class DefaultRegexDateParserTest {
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class FileTypeUtilTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void webpTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I5BGTF
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I5BGTF
|
||||
final File file = FileUtil.file("d:/test/a.webp");
|
||||
final BufferedInputStream inputStream = FileUtil.getInputStream(file);
|
||||
final String type = FileTypeUtil.getType(inputStream);
|
||||
|
@ -23,7 +23,7 @@ import java.io.File;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/IAB65V
|
||||
* https://gitee.com/chinabugotech/hutool/issues/IAB65V
|
||||
*/
|
||||
public class IssueIAB65VTest {
|
||||
@Test
|
||||
|
@ -44,7 +44,7 @@ public class CaseInsensitiveMapTest {
|
||||
|
||||
@Test
|
||||
public void mergeTest(){
|
||||
//https://github.com/dromara/hutool/issues/2086
|
||||
//https://github.com/chinabugotech/hutool/issues/2086
|
||||
final Map.Entry<String, String> b = MapUtil.entry("a", "value");
|
||||
final Map.Entry<String, String> a = MapUtil.entry("A", "value");
|
||||
final CaseInsensitiveMap<Object, Object> map = new CaseInsensitiveMap<>();
|
||||
|
@ -22,6 +22,7 @@ import cn.hutool.v7.core.thread.ThreadUtil;
|
||||
import cn.hutool.v7.core.util.ObjUtil;
|
||||
import cn.hutool.v7.core.util.RandomUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class WeakConcurrentMapTest {
|
||||
@ -60,6 +61,7 @@ public class WeakConcurrentMapTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void getConcurrencyTest() {
|
||||
final WeakConcurrentMap<String, String> cache = new WeakConcurrentMap<>();
|
||||
final ConcurrencyTester tester = new ConcurrencyTester(2000);
|
||||
|
@ -48,7 +48,7 @@ public class CalculatorTest {
|
||||
|
||||
@Test
|
||||
public void conversationTest5(){
|
||||
// https://github.com/dromara/hutool/issues/1984
|
||||
// https://github.com/chinabugotech/hutool/issues/1984
|
||||
final double conversion = Calculator.conversion("((1/1) / (1/1) -1) * 100");
|
||||
assertEquals(0, conversion, 0);
|
||||
}
|
||||
@ -61,7 +61,7 @@ public class CalculatorTest {
|
||||
|
||||
@Test
|
||||
public void conversationTest7() {
|
||||
//https://gitee.com/dromara/hutool/issues/I4KONB
|
||||
//https://gitee.com/chinabugotech/hutool/issues/I4KONB
|
||||
final double conversion = Calculator.conversion("((-2395+0) * 0.3+140.24+35+90)/30");
|
||||
assertEquals(-15.11D, conversion, 0.01);
|
||||
}
|
||||
@ -69,7 +69,7 @@ public class CalculatorTest {
|
||||
@Test
|
||||
public void issue2964Test() {
|
||||
// 忽略数字之间的运算符,按照乘法对待。
|
||||
// https://github.com/dromara/hutool/issues/2964
|
||||
// https://github.com/chinabugotech/hutool/issues/2964
|
||||
final double calcValue = Calculator.conversion("(11+2)12");
|
||||
assertEquals(156D, calcValue, 0.001);
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ public class NumberUtilTest {
|
||||
|
||||
@Test
|
||||
public void issue2878Test() throws ParseException {
|
||||
// https://github.com/dromara/hutool/issues/2878
|
||||
// https://github.com/chinabugotech/hutool/issues/2878
|
||||
// 当数字中包含一些非数字字符时,按照JDK的规则,不做修改。
|
||||
final BigDecimal bigDecimal = NumberUtil.toBigDecimal("345.sdf");
|
||||
assertEquals(NumberFormat.getInstance().parse("345.sdf"), bigDecimal.longValue());
|
||||
|
@ -44,7 +44,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void buildWithoutSlashTest() {
|
||||
// https://github.com/dromara/hutool/issues/2459
|
||||
// https://github.com/chinabugotech/hutool/issues/2459
|
||||
String buildUrl = UrlBuilder.of().setScheme("http").setHost("192.168.1.1").setPort(8080).setWithEndTag(false).build();
|
||||
assertEquals("http://192.168.1.1:8080", buildUrl);
|
||||
|
||||
@ -297,7 +297,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void encodePathTest2() {
|
||||
// https://gitee.com/dromara/hutool/issues/I4RA42
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4RA42
|
||||
// Path中`:`在第一个segment需要转义,之后的不需要
|
||||
final String urlStr = "https://hutool.cn/aa/bb/Pre-K,Kindergarten,First,Second,Third,Fourth,Fifth/Page:3";
|
||||
final UrlBuilder urlBuilder = UrlBuilder.ofHttp(urlStr, CharsetUtil.UTF_8);
|
||||
@ -316,7 +316,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void fragmentEncodeTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I49KAL
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I49KAL
|
||||
// 见:https://stackoverflow.com/questions/26088849/url-fragment-allowed-characters
|
||||
final String url = "https://hutool.cn/docs/#/?id=简介";
|
||||
UrlBuilder urlBuilder = UrlBuilder.ofHttp(url);
|
||||
@ -328,7 +328,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void slashEncodeTest() {
|
||||
// https://github.com/dromara/hutool/issues/1904
|
||||
// https://github.com/chinabugotech/hutool/issues/1904
|
||||
// 在query中,"/"是不可转义字符
|
||||
// 见:https://www.rfc-editor.org/rfc/rfc3986.html#section-3.4
|
||||
final String url = "https://invoice.maycur.com/2b27a802-8423-4d41-86f5-63a6b259f61e.xlsx?download/2b27a802-8423-4d41-86f5-63a6b259f61e.xlsx&e=1630491088";
|
||||
@ -351,7 +351,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void addPathEncodeTest2() {
|
||||
// https://github.com/dromara/hutool/issues/1912
|
||||
// https://github.com/chinabugotech/hutool/issues/1912
|
||||
final String url = UrlBuilder.of()
|
||||
.setScheme("https")
|
||||
.setHost("domain.cn")
|
||||
@ -377,7 +377,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void fragmentTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I49KAL#note_8060874
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I49KAL#note_8060874
|
||||
final String url = "https://www.hutool.cn/#/a/b?timestamp=1640391380204";
|
||||
final UrlBuilder builder = UrlBuilder.ofHttp(url);
|
||||
|
||||
@ -386,7 +386,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void fragmentAppendParamTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I49KAL#note_8060874
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I49KAL#note_8060874
|
||||
final String url = "https://www.hutool.cn/#/a/b";
|
||||
final UrlBuilder builder = UrlBuilder.ofHttp(url);
|
||||
builder.setFragment(builder.getFragment() + "?timestamp=1640391380204");
|
||||
@ -450,7 +450,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void issue2243Test() {
|
||||
// https://github.com/dromara/hutool/issues/2243
|
||||
// https://github.com/chinabugotech/hutool/issues/2243
|
||||
// 如果用户已经做了%编码,不应该重复编码
|
||||
final String url = "https://hutool.cn/v1.0?privateNum=%2B8616512884988";
|
||||
final String s = UrlBuilder.of(url, null).toString();
|
||||
@ -492,7 +492,7 @@ public class UrlBuilderTest {
|
||||
|
||||
@Test
|
||||
public void addPathTest() {
|
||||
//https://gitee.com/dromara/hutool/issues/I5O4ML
|
||||
//https://gitee.com/chinabugotech/hutool/issues/I5O4ML
|
||||
UrlBuilder.of().addPath("");
|
||||
UrlBuilder.of().addPath("/");
|
||||
UrlBuilder.of().addPath("//");
|
||||
|
@ -40,7 +40,7 @@ class UrlDecoderTest {
|
||||
|
||||
@Test
|
||||
void issue3063Test() throws UnsupportedEncodingException {
|
||||
// https://github.com/dromara/hutool/issues/3063
|
||||
// https://github.com/chinabugotech/hutool/issues/3063
|
||||
|
||||
final String s = "测试";
|
||||
final String expectedDecode = "%FE%FF%6D%4B%8B%D5";
|
||||
|
@ -68,7 +68,7 @@ public class UrlQueryTest {
|
||||
|
||||
@Test
|
||||
public void parseTest4() {
|
||||
// https://github.com/dromara/hutool/issues/1989
|
||||
// https://github.com/chinabugotech/hutool/issues/1989
|
||||
final String queryStr = "imageMogr2/thumbnail/x800/format/jpg";
|
||||
final UrlQuery query = UrlQuery.of(queryStr, CharsetUtil.UTF_8);
|
||||
Assertions.assertEquals(queryStr, query.toString());
|
||||
|
@ -23,7 +23,7 @@ import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 见:<a href="https://gitee.com/dromara/hutool/pulls/447/files">https://gitee.com/dromara/hutool/pulls/447/files</a>
|
||||
* 见:<a href="https://gitee.com/chinabugotech/hutool/pulls/447/files">https://gitee.com/chinabugotech/hutool/pulls/447/files</a>
|
||||
* <p>
|
||||
* TODO 同时继承泛型和实现泛型接口需要解析,此处为F
|
||||
*/
|
||||
|
@ -573,7 +573,7 @@ public class EasyStreamTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/pull/3128
|
||||
* https://github.com/chinabugotech/hutool/pull/3128
|
||||
*/
|
||||
@Test
|
||||
void testStreamBigDecimal() {
|
||||
|
@ -37,7 +37,7 @@ public class CharSequenceUtilTest {
|
||||
|
||||
@Test
|
||||
public void replaceTest2() {
|
||||
// https://gitee.com/dromara/hutool/issues/I4M16G
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4M16G
|
||||
final String replace = "#{A}";
|
||||
final String result = CharSequenceUtil.replace(replace, "#{AAAAAAA}", "1");
|
||||
assertEquals(replace, result);
|
||||
@ -72,7 +72,7 @@ public class CharSequenceUtilTest {
|
||||
result = CharSequenceUtil.addSuffixIfNot(str, " is Good");
|
||||
assertEquals(str + " is Good", result);
|
||||
|
||||
// https://gitee.com/dromara/hutool/issues/I4NS0F
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4NS0F
|
||||
result = CharSequenceUtil.addSuffixIfNot("", "/");
|
||||
assertEquals("/", result);
|
||||
}
|
||||
@ -113,7 +113,7 @@ public class CharSequenceUtilTest {
|
||||
|
||||
@Test
|
||||
public void subPreGbkTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I4JO2E
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4JO2E
|
||||
final String s = "华硕K42Intel酷睿i31代2G以下独立显卡不含机械硬盘固态硬盘120GB-192GB4GB-6GB";
|
||||
|
||||
String v = CharSequenceUtil.subPreGbk(s, 40, false);
|
||||
@ -131,7 +131,7 @@ public class CharSequenceUtilTest {
|
||||
|
||||
@Test
|
||||
public void startWithTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I4MV7Q
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4MV7Q
|
||||
assertFalse(CharSequenceUtil.startWith("123", "123", false, true));
|
||||
assertFalse(CharSequenceUtil.startWith(null, null, false, true));
|
||||
assertFalse(CharSequenceUtil.startWith("abc", "abc", true, true));
|
||||
|
@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
|
||||
public class IssueI73AB9Test {
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I73AB9
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I73AB9
|
||||
*/
|
||||
@Test
|
||||
void subWithLengthTest() {
|
||||
|
@ -50,16 +50,16 @@ public class NamingCaseTest {
|
||||
.set("H#case", "H#case")
|
||||
.set("PNLabel", "PN_label")
|
||||
.set("wPRunOZTime", "w_P_run_OZ_time")
|
||||
// https://github.com/dromara/hutool/issues/2070
|
||||
// https://github.com/chinabugotech/hutool/issues/2070
|
||||
.set("customerNickV2", "customer_nick_v2")
|
||||
// https://gitee.com/dromara/hutool/issues/I4X9TT
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4X9TT
|
||||
.set("DEPT_NAME","DEPT_NAME")
|
||||
.forEach((key, value) -> Assertions.assertEquals(value, NamingCase.toUnderlineCase(key)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issueI5TVMUTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I5TVMU
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I5TVMU
|
||||
Assertions.assertEquals("t1C1", NamingCase.toUnderlineCase("t1C1"));
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ public class StrUtilTest {
|
||||
containsAny = StrUtil.containsAny("aaabbbccc", "d", "c");
|
||||
Assertions.assertTrue(containsAny);
|
||||
|
||||
// https://gitee.com/dromara/hutool/issues/I7WSYD
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I7WSYD
|
||||
containsAny = StrUtil.containsAny("你好啊", "嗯", null);
|
||||
Assertions.assertFalse(containsAny);
|
||||
}
|
||||
@ -598,7 +598,7 @@ public class StrUtilTest {
|
||||
|
||||
@Test
|
||||
public void testReplace2() {
|
||||
// https://gitee.com/dromara/hutool/issues/I4M16G
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4M16G
|
||||
final String replace = "#{A}";
|
||||
final String result = StrUtil.replace(replace, "#{AAAAAAA}", "1");
|
||||
assertEquals(replace, result);
|
||||
|
@ -62,7 +62,7 @@ public class TextSimilarityTest {
|
||||
@Test
|
||||
@Disabled
|
||||
void longestCommonSubstringLengthTest() {
|
||||
// https://github.com/dromara/hutool/issues/3045
|
||||
// https://github.com/chinabugotech/hutool/issues/3045
|
||||
final String strCommon = RandomUtil.randomStringLower(1024 * 32);
|
||||
final String strA = RandomUtil.randomStringLower(1024 * 32) + strCommon;
|
||||
final String strB = RandomUtil.randomStringLower(1024 * 32) + strCommon;
|
||||
|
@ -55,7 +55,7 @@ public class EscapeUtilTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I49JU8
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I49JU8
|
||||
*/
|
||||
@Test
|
||||
public void escapeAllTest2(){
|
||||
|
@ -105,7 +105,7 @@ public class SplitUtilTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/2099
|
||||
* https://github.com/chinabugotech/hutool/issues/2099
|
||||
*/
|
||||
@Test
|
||||
public void splitByRegexTest(){
|
||||
|
@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
public class SyncFinisherTest {
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I716SX
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I716SX
|
||||
*/
|
||||
@SuppressWarnings("DataFlowIssue")
|
||||
@Test
|
||||
|
@ -151,7 +151,7 @@ public class TreeTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/pulls/1248/
|
||||
* https://gitee.com/chinabugotech/hutool/pulls/1248/
|
||||
*/
|
||||
@Test
|
||||
public void lambdaConfigTest() {
|
||||
|
@ -33,7 +33,7 @@ public class ClassUtilTest {
|
||||
@Test
|
||||
public void getClassNameTest() {
|
||||
final String className = ClassUtil.getClassName(ClassUtil.class, false);
|
||||
Assertions.assertEquals("cn.hutool.v7.core.reflect.core.ClassUtil", className);
|
||||
Assertions.assertEquals("cn.hutool.v7.core.reflect.ClassUtil", className);
|
||||
|
||||
final String simpleClassName = ClassUtil.getClassName(ClassUtil.class, true);
|
||||
Assertions.assertEquals("ClassUtil", simpleClassName);
|
||||
@ -47,9 +47,10 @@ public class ClassUtilTest {
|
||||
|
||||
@Test
|
||||
public void getShortClassNameTest() {
|
||||
final String className = "cn.hutool.v7.core.text.core.StrUtil";
|
||||
final String className = "cn.hutool.v7.core.text.StrUtil";
|
||||
final String result = ClassUtil.getShortClassName(className);
|
||||
Assertions.assertEquals("o.d.h.c.t.StrUtil", result);
|
||||
System.out.println(result);
|
||||
Assertions.assertEquals("c.h.v.c.t.StrUtil", result);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -62,7 +62,7 @@ public class HexUtilTest {
|
||||
String a = "0x3544534F444";
|
||||
Assertions.assertTrue(HexUtil.isHexNumber(a));
|
||||
|
||||
// https://gitee.com/dromara/hutool/issues/I62H7K
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I62H7K
|
||||
a = "0x0000000000000001158e460913d00000";
|
||||
Assertions.assertTrue(HexUtil.isHexNumber(a));
|
||||
|
||||
@ -70,7 +70,7 @@ public class HexUtilTest {
|
||||
a = "0x0000001000T00001158e460913d00000";
|
||||
Assertions.assertFalse(HexUtil.isHexNumber(a));
|
||||
|
||||
// 错误的,https://github.com/dromara/hutool/issues/2857
|
||||
// 错误的,https://github.com/chinabugotech/hutool/issues/2857
|
||||
a = "-1";
|
||||
Assertions.assertFalse(HexUtil.isHexNumber(a));
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/3136
|
||||
* https://github.com/chinabugotech/hutool/issues/3136
|
||||
*/
|
||||
public class Issue3136Test {
|
||||
|
||||
|
@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
|
||||
public class SystemUtilTest {
|
||||
@Test
|
||||
void getSystemPropertiesTest() {
|
||||
final String s = SystemUtil.get("path");
|
||||
final String s = SystemUtil.get("PATH");
|
||||
Assertions.assertNotNull(s);
|
||||
}
|
||||
}
|
||||
|
@ -14,5 +14,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
cn.hutool.v7.extra.aop.engine.spring.SpringCglibProxyEngine
|
||||
cn.hutool.v7.extra.aop.engine.jdk.JdkProxyEngine
|
||||
cn.hutool.v7.core.spi.ListServiceLoaderTest$TestService2
|
||||
cn.hutool.v7.core.spi.ListServiceLoaderTest$TestService1
|
||||
|
@ -29,7 +29,7 @@ import java.security.SecureRandom;
|
||||
/**
|
||||
* 同态加密算法Paillier<br>
|
||||
* 来自:https://github.com/peterstefanov/paillier<br>
|
||||
* 来自:https://github.com/dromara/hutool/pull/3131
|
||||
* 来自:https://github.com/chinabugotech/hutool/pull/3131
|
||||
* <p>
|
||||
* 加法同态,存在有效算法+,E(x+y)=E(x)+E(y)或者 x+y=D(E(x)+E(y))成立,并且不泄漏 x 和 y。
|
||||
* 乘法同态,存在有效算法*,E(x×y)=E(x)*E(y)或者 xy=D(E(x)*E(y))成立,并且不泄漏 x 和 y。
|
||||
|
@ -77,7 +77,7 @@ public class KeyUtilTest {
|
||||
|
||||
@Test
|
||||
public void generateSm4KeyTest(){
|
||||
// https://github.com/dromara/hutool/issues/2150
|
||||
// https://github.com/chinabugotech/hutool/issues/2150
|
||||
Assertions.assertEquals(16, KeyUtil.generateKey("sm4").getEncoded().length);
|
||||
Assertions.assertEquals(32, KeyUtil.generateKey("sm4", 256).getEncoded().length);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class RSATest {
|
||||
|
||||
@Test
|
||||
public void rsaECBTest() {
|
||||
final RSA rsa = new RSA(AsymmetricAlgorithm.RSA_ECB.getValue());
|
||||
final RSA rsa = new RSA(AsymmetricAlgorithm.RSA_ECB_PKCS1.getValue());
|
||||
|
||||
// 获取私钥和公钥
|
||||
assertNotNull(rsa.getPrivateKey());
|
||||
|
@ -94,7 +94,7 @@ public class PemUtilTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void readECPrivateKeyTest2() {
|
||||
// https://gitee.com/dromara/hutool/issues/I37Z75
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I37Z75
|
||||
final byte[] d = PemUtil.readPem(FileUtil.getInputStream("d:/test/keys/priv.key"));
|
||||
final byte[] publicKey = PemUtil.readPem(FileUtil.getInputStream("d:/test/keys/pub.key"));
|
||||
|
||||
|
@ -29,7 +29,7 @@ public class CBCBlockCipherMacEngineTest {
|
||||
|
||||
@Test
|
||||
public void SM4CMACTest(){
|
||||
// https://github.com/dromara/hutool/issues/2206
|
||||
// https://github.com/chinabugotech/hutool/issues/2206
|
||||
final byte[] key = new byte[16];
|
||||
final CipherParameters parameter = new KeyParameter(KeyUtil.generateKey("SM4", key).getEncoded());
|
||||
final Mac mac = new Mac(new SM4MacEngine(parameter));
|
||||
@ -43,7 +43,7 @@ public class CBCBlockCipherMacEngineTest {
|
||||
|
||||
@Test
|
||||
public void SM4CMACWithIVTest(){
|
||||
// https://github.com/dromara/hutool/issues/2206
|
||||
// https://github.com/chinabugotech/hutool/issues/2206
|
||||
final byte[] key = new byte[16];
|
||||
final byte[] iv = new byte[16];
|
||||
CipherParameters parameter = new KeyParameter(KeyUtil.generateKey("SM4", key).getEncoded());
|
||||
|
@ -102,7 +102,7 @@ public class HmacTest {
|
||||
|
||||
@Test
|
||||
public void sm4CMACTest(){
|
||||
// https://github.com/dromara/hutool/issues/2206
|
||||
// https://github.com/chinabugotech/hutool/issues/2206
|
||||
final byte[] key = new byte[16];
|
||||
final HMac mac = new HMac(HmacAlgorithm.SM4CMAC,
|
||||
KeyUtil.generateKey("SM4", key));
|
||||
|
@ -27,7 +27,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I4EMST
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I4EMST
|
||||
*/
|
||||
public class Sm4StreamTest {
|
||||
|
||||
|
@ -186,7 +186,7 @@ public interface Dialect extends Serializable {
|
||||
* @since 5.7.2
|
||||
*/
|
||||
default PreparedStatement psForCount(final Connection conn, SqlBuilder sqlBuilder) throws DbException {
|
||||
// https://gitee.com/dromara/hutool/issues/I713XQ
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I713XQ
|
||||
// 为了兼容informix等数据库,此处使用count(*)而非count(1)
|
||||
sqlBuilder = sqlBuilder
|
||||
.insertPreFragment("SELECT count(*) from(")
|
||||
|
@ -198,7 +198,7 @@ public class DbTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void queryFetchTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I4JXWN
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4JXWN
|
||||
Db.of().query((conn -> {
|
||||
final PreparedStatement ps = conn.prepareStatement("select * from table",
|
||||
ResultSet.TYPE_FORWARD_ONLY,
|
||||
|
@ -106,7 +106,7 @@ public class DsTest {
|
||||
|
||||
@Test
|
||||
public void c3p0DsuserAndPassTest() {
|
||||
// https://gitee.com/dromara/hutool/issues/I4T7XZ
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4T7XZ
|
||||
DSUtil.setGlobalDSFactory(new C3p0DSFactory());
|
||||
final ComboPooledDataSource ds = (ComboPooledDataSource) DSUtil.getDS("mysql").getRaw();
|
||||
Assertions.assertEquals("root", ds.getUser());
|
||||
|
@ -53,7 +53,7 @@ public class SpringCglibProxyEngine implements ProxyEngine {
|
||||
|
||||
/**
|
||||
* 创建代理对象<br>
|
||||
* https://gitee.com/dromara/hutool/issues/I74EX7<br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I74EX7<br>
|
||||
* 某些对象存在非空参数构造,则需遍历查找需要的构造完成代理对象构建。
|
||||
*
|
||||
* @param <T> 代理对象类型
|
||||
|
@ -115,7 +115,7 @@ public abstract class AbstractFtp implements Ftp {
|
||||
|
||||
/**
|
||||
* 下载文件-避免未完成的文件<br>
|
||||
* 来自:<a href="https://gitee.com/dromara/hutool/pulls/407">https://gitee.com/dromara/hutool/pulls/407</a><br>
|
||||
* 来自:<a href="https://gitee.com/chinabugotech/hutool/pulls/407">https://gitee.com/chinabugotech/hutool/pulls/407</a><br>
|
||||
* 此方法原理是先在目标文件同级目录下创建临时文件,下载之,等下载完毕后重命名,避免因下载错误导致的文件不完整。
|
||||
*
|
||||
* @param path 文件路径
|
||||
|
@ -14,5 +14,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
cn.hutool.v7.core.spi.ListServiceLoaderTest$TestService2
|
||||
cn.hutool.v7.core.spi.ListServiceLoaderTest$TestService1
|
||||
cn.hutool.v7.extra.aop.engine.spring.SpringCglibProxyEngine
|
||||
cn.hutool.v7.extra.aop.engine.jdk.JdkProxyEngine
|
||||
|
@ -14,12 +14,14 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
cn.hutool.v7.extra.tokenizer.engine.ansj.AnsjEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.hanlp.HanLPEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.ikanalyzer.IKAnalyzerEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.jcseg.JcsegEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.jieba.JiebaEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.mmseg.MmsegEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.word.WordEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.analysis.SmartcnEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.mynlp.MynlpEngine
|
||||
# 实现:org.dromara.hutool.extra.template.engine.TemplateEngine
|
||||
|
||||
cn.hutool.v7.extra.template.engine.beetl.BeetlEngine
|
||||
cn.hutool.v7.extra.template.engine.freemarker.FreemarkerEngine
|
||||
cn.hutool.v7.extra.template.engine.velocity.VelocityEngine
|
||||
cn.hutool.v7.extra.template.engine.rythm.RythmEngine
|
||||
cn.hutool.v7.extra.template.engine.enjoy.EnjoyEngine
|
||||
cn.hutool.v7.extra.template.engine.thymeleaf.ThymeleafEngine
|
||||
cn.hutool.v7.extra.template.engine.wit.WitEngine
|
||||
cn.hutool.v7.extra.template.engine.jetbrick.JetbrickEngine
|
||||
cn.hutool.v7.extra.template.engine.pebble.PebbleTemplateEngine
|
||||
|
@ -14,10 +14,12 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
cn.hutool.v7.db.ds.hikari.HikariDSFactory
|
||||
cn.hutool.v7.db.ds.druid.DruidDSFactory
|
||||
cn.hutool.v7.db.ds.tomcat.TomcatDSFactory
|
||||
cn.hutool.v7.db.ds.bee.BeeDSFactory
|
||||
cn.hutool.v7.db.ds.dbcp.DbcpDSFactory
|
||||
cn.hutool.v7.db.ds.c3p0.C3p0DSFactory
|
||||
cn.hutool.v7.db.ds.pooled.PooledDSFactory
|
||||
cn.hutool.v7.extra.tokenizer.engine.ansj.AnsjEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.hanlp.HanLPEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.ikanalyzer.IKAnalyzerEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.jcseg.JcsegEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.jieba.JiebaEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.mmseg.MmsegEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.word.WordEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.analysis.SmartcnEngine
|
||||
cn.hutool.v7.extra.tokenizer.engine.mynlp.MynlpEngine
|
||||
|
@ -34,7 +34,7 @@ public class IssueI74EX7Test {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/I74EX7<br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I74EX7<br>
|
||||
* Enhancer.create()默认调用无参构造,有参构造或者多个构造没有很好的兼容。
|
||||
*
|
||||
*/
|
||||
|
@ -63,7 +63,7 @@ public class ManagementUtilTest {
|
||||
|
||||
@Test
|
||||
public void getUserInfoTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I3NM39
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I3NM39
|
||||
final UserInfo userInfo = ManagementUtil.getUserInfo();
|
||||
Assertions.assertTrue(userInfo.getTempDir().endsWith(File.separator));
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ import java.util.*;
|
||||
public class ThymeleafTest {
|
||||
|
||||
/**
|
||||
* <a href="https://github.com/dromara/hutool/issues/2530">...</a>
|
||||
* <a href="https://github.com/chinabugotech/hutool/issues/2530">...</a>
|
||||
* 自定义操作原始引擎
|
||||
*/
|
||||
@Test
|
||||
|
@ -168,7 +168,7 @@ public class HttpGlobalConfig implements Serializable {
|
||||
|
||||
/**
|
||||
* 是否信任所有Host<br>
|
||||
* 见:https://github.com/dromara/hutool/issues/2042<br>
|
||||
* 见:https://github.com/chinabugotech/hutool/issues/2042<br>
|
||||
*
|
||||
* @param customTrustAnyHost 如果设置为{@code false},则按照JDK默认验证机制,验证目标服务器的证书host和请求host是否一致,{@code true}表示不验证。
|
||||
* @since 5.8.27
|
||||
|
@ -165,7 +165,7 @@ public class ResponseBody implements HttpBody, Closeable {
|
||||
|
||||
/**
|
||||
* 将响应内容写出到文件-避免未完成的文件
|
||||
* 来自:<a href="https://gitee.com/dromara/hutool/pulls/407">https://gitee.com/dromara/hutool/pulls/407</a><br>
|
||||
* 来自:<a href="https://gitee.com/chinabugotech/hutool/pulls/407">https://gitee.com/chinabugotech/hutool/pulls/407</a><br>
|
||||
* 此方法原理是先在目标文件同级目录下创建临时文件,下载之,等下载完毕后重命名,避免因下载错误导致的文件不完整。
|
||||
*
|
||||
* @param targetFileOrDir 写出到的文件或目录
|
||||
@ -178,7 +178,7 @@ public class ResponseBody implements HttpBody, Closeable {
|
||||
|
||||
/**
|
||||
* 将响应内容写出到文件-避免未完成的文件
|
||||
* 来自:<a href="https://gitee.com/dromara/hutool/pulls/407">https://gitee.com/dromara/hutool/pulls/407</a><br>
|
||||
* 来自:<a href="https://gitee.com/chinabugotech/hutool/pulls/407">https://gitee.com/chinabugotech/hutool/pulls/407</a><br>
|
||||
* 此方法原理是先在目标文件同级目录下创建临时文件,下载之,等下载完毕后重命名,避免因下载错误导致的文件不完整。
|
||||
*
|
||||
* @param targetFileOrDir 写出到的文件或目录
|
||||
|
@ -78,7 +78,7 @@ public class UploadTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void smmsTest(){
|
||||
// https://github.com/dromara/hutool/issues/2079
|
||||
// https://github.com/chinabugotech/hutool/issues/2079
|
||||
// hutool的user agent 被封了
|
||||
final String token = "test";
|
||||
final String url = "https://sm.ms/api/v2/upload";
|
||||
|
@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 测试上传超时情况<br>
|
||||
* https://gitee.com/dromara/hutool/issues/I6Q30X<br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/I6Q30X<br>
|
||||
*
|
||||
* post http://localhost:8888/file
|
||||
* form-data: file: file-data
|
||||
|
@ -222,7 +222,7 @@ public class UserAgentUtilTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/dromara/hutool/issues/1177
|
||||
* https://github.com/chinabugotech/hutool/issues/1177
|
||||
*/
|
||||
@Test
|
||||
public void parseMicroMessengerTest() {
|
||||
@ -379,7 +379,7 @@ public class UserAgentUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseEdgATest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I4MCBP
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4MCBP
|
||||
final String uaStr = "userAgent: Mozilla/5.0 (Linux; Android 11; MI 9 Transparent Edition) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Mobile Safari/537.36 EdgA/96.0.1054.36";
|
||||
final UserAgent ua = UserAgentUtil.parse(uaStr);
|
||||
assertEquals("MSEdge", ua.getBrowser().toString());
|
||||
@ -394,7 +394,7 @@ public class UserAgentUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseLenovoTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I4QBMD
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I4QBMD
|
||||
final String uaStr = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36 SLBrowser/7.0.0.6241 SLBChan/30";
|
||||
final UserAgent ua = UserAgentUtil.parse(uaStr);
|
||||
|
||||
@ -425,7 +425,7 @@ public class UserAgentUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseFromDeepinTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I50YGY
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I50YGY
|
||||
final String uaStr = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36";
|
||||
final UserAgent ua = UserAgentUtil.parse(uaStr);
|
||||
assertEquals("Linux", ua.getOs().toString());
|
||||
@ -446,7 +446,7 @@ public class UserAgentUtilTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://gitee.com/dromara/hutool/issues/I7OTCU">fix : issues I7OTCU </a>
|
||||
* <a href="https://gitee.com/chinabugotech/hutool/issues/I7OTCU">fix : issues I7OTCU </a>
|
||||
*/
|
||||
@Test
|
||||
public void issuseI7OTCUTest() {
|
||||
|
@ -362,7 +362,7 @@ public class JSONTokener extends ReaderWrapper {
|
||||
case CharUtil.LF:
|
||||
case CharUtil.CR:
|
||||
//throw this.syntaxError("Unterminated string");
|
||||
// https://gitee.com/dromara/hutool/issues/I76CSU
|
||||
// https://gitee.com/chinabugotech/hutool/issues/I76CSU
|
||||
// 兼容非转义符
|
||||
sb.append(c);
|
||||
break;
|
||||
|
@ -106,7 +106,7 @@ public class ArrayTypeAdapter implements MatcherJSONSerializer<Object>, MatcherJ
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/dromara/hutool/issues/2369
|
||||
// https://github.com/chinabugotech/hutool/issues/2369
|
||||
// 非标准的二进制流,则按照普通数组对待
|
||||
final JSONArray result = context.getOrCreateArray();
|
||||
for (final byte b : bytes) {
|
||||
|
@ -250,7 +250,7 @@ public class JSONArrayTest {
|
||||
assertEquals(3, jsonArray.size());
|
||||
}
|
||||
|
||||
// https://github.com/dromara/hutool/issues/1858
|
||||
// https://github.com/chinabugotech/hutool/issues/1858
|
||||
@Test
|
||||
public void putTest2() {
|
||||
final JSONArray jsonArray = new JSONArray();
|
||||
|
@ -318,7 +318,7 @@ public class JSONUtilTest {
|
||||
|
||||
@Test
|
||||
public void sqlExceptionTest() {
|
||||
//https://github.com/dromara/hutool/issues/1399
|
||||
//https://github.com/chinabugotech/hutool/issues/1399
|
||||
// SQLException实现了Iterable接口,默认是遍历之,会栈溢出,修正后只返回string
|
||||
final JSONObject set = JSONUtil.ofObj().putValue("test", new SQLException("test"));
|
||||
assertEquals("{\"test\":\"java.sql.SQLException: test\"}", set.toString());
|
||||
|
@ -43,7 +43,7 @@ public class JacksonTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://gitee.com/dromara/hutool/issues/IB3GM4<br>
|
||||
* https://gitee.com/chinabugotech/hutool/issues/IB3GM4<br>
|
||||
* JSON和Jackson兼容
|
||||
*/
|
||||
@Test
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user