change link

This commit is contained in:
Looly 2025-02-21 17:40:14 +08:00
parent bfad067365
commit 05f16f051e
103 changed files with 217 additions and 205 deletions

2
.github/FUNDING.yml vendored
View File

@ -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']

View File

@ -1090,4 +1090,4 @@
* 【core 】 修复农历转公历在闰月时错误issue#I4ZSGJ@Gitee
# 5.7.x 或更早版本
* [https://gitee.com/dromara/hutool/blob/v5-master/CHANGELOG_5.0-5.7.md](https://gitee.com/dromara/hutool/blob/v5-master/CHANGELOG_5.0-5.7.md)
* [https://gitee.com/chinabugotech/hutool/blob/v5-master/CHANGELOG_5.0-5.7.md](https://gitee.com/chinabugotech/hutool/blob/v5-master/CHANGELOG_5.0-5.7.md)

View File

@ -18,26 +18,26 @@
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
<img src="https://img.shields.io/badge/JDK-8+-green.svg" />
</a>
<a target="_blank" href="https://travis-ci.com/dromara/hutool">
<img src="https://travis-ci.com/dromara/hutool.svg?branch=v5-master" />
<a target="_blank" href="https://travis-ci.com/chinabugotech/hutool">
<img src="https://travis-ci.com/chinabugotech/hutool.svg?branch=v5-master" />
</a>
<a href="https://www.codacy.com/gh/dromara/hutool/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=dromara/hutool&amp;utm_campaign=Badge_Grade">
<a href="https://www.codacy.com/gh/chinabugotech/hutool/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=chinabugotech/hutool&amp;utm_campaign=Badge_Grade">
<img src="https://app.codacy.com/project/badge/Grade/8a6897d9de7440dd9de8804c28d2871d"/>
</a>
<a href="https://codecov.io/gh/dromara/hutool">
<img src="https://codecov.io/gh/dromara/hutool/branch/v5-master/graph/badge.svg" />
<a href="https://codecov.io/gh/chinabugotech/hutool">
<img src="https://codecov.io/gh/chinabugotech/hutool/branch/v5-master/graph/badge.svg" />
</a>
<a target="_blank" href="https://gitter.im/hutool/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
<img src="https://badges.gitter.im/hutool/Lobby.svg" />
</a>
<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 target="_blank" href='https://gitee.com/chinabugotech/hutool/stargazers'>
<img src='https://gitee.com/chinabugotech/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>
@ -154,9 +154,9 @@ implementation 'cn.hutool:hutool-all:5.8.37'
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}
@ -180,9 +180,9 @@ Hutool's source code is divided into two branches:
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)
@ -201,4 +201,4 @@ Hutool welcomes anyone to contribute code to Hutool, but the author suffers from
## ⭐Star Hutool
[![Stargazers over time](https://starchart.cc/dromara/hutool.svg)](https://starchart.cc/dromara/hutool)
[![Stargazers over time](https://starchart.cc/chinabugotech/hutool.svg)](https://starchart.cc/chinabugotech/hutool)

View File

@ -18,26 +18,23 @@
<a target="_blank" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
<img src="https://img.shields.io/badge/JDK-8+-green.svg" />
</a>
<a target="_blank" href="https://travis-ci.com/dromara/hutool">
<img src="https://travis-ci.com/dromara/hutool.svg?branch=v5-master" />
<a target="_blank" href="https://travis-ci.com/chinabugotech/hutool">
<img src="https://travis-ci.com/chinabugotech/hutool.svg?branch=v5-master" />
</a>
<a href="https://www.codacy.com/gh/dromara/hutool/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=dromara/hutool&amp;utm_campaign=Badge_Grade">
<a href="https://www.codacy.com/gh/chinabugotech/hutool/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=chinabugotech/hutool&amp;utm_campaign=Badge_Grade">
<img src="https://app.codacy.com/project/badge/Grade/8a6897d9de7440dd9de8804c28d2871d"/>
</a>
<a href="https://codecov.io/gh/dromara/hutool">
<img src="https://codecov.io/gh/dromara/hutool/branch/v5-master/graph/badge.svg" />
<a href="https://codecov.io/gh/chinabugotech/hutool">
<img src="https://codecov.io/gh/chinabugotech/hutool/branch/v5-master/graph/badge.svg" />
</a>
<a target="_blank" href="https://gitter.im/hutool/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
<img src="https://badges.gitter.im/hutool/Lobby.svg" />
<a target="_blank" href='https://gitee.com/chinabugotech/hutool/stargazers'>
<img src='https://gitee.com/chinabugotech/hutool/badge/star.svg?theme=gvp' alt='star'/>
</a>
<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 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://github.com/dromara/hutool'>
<img src="https://img.shields.io/github/stars/dromara/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>
@ -147,7 +144,7 @@ implementation 'cn.hutool:hutool-all:5.8.37'
### 🚽编译安装
访问Hutool的Gitee主页[https://gitee.com/dromara/hutool](https://gitee.com/dromara/hutool) 下载整个项目源码v5-master或v5-dev分支都可然后进入Hutool项目目录执行
访问Hutool的Gitee主页[https://gitee.com/chinabugotech/hutool](https://gitee.com/chinabugotech/hutool) 下载整个项目源码v5-master或v5-dev分支都可然后进入Hutool项目目录执行
```sh
./hutool.sh install
@ -172,9 +169,9 @@ Hutool的源码分为两个分支功能如下
提交问题反馈请说明正在使用的JDK版本呢、Hutool版本和相关依赖库版本。
- [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)
### 🧬贡献代码的步骤
@ -204,4 +201,4 @@ Hutool欢迎任何人为Hutool添砖加瓦贡献代码不过维护者是
## ⭐Star Hutool
[![Stargazers over time](https://starchart.cc/dromara/hutool.svg)](https://starchart.cc/dromara/hutool)
[![Stargazers over time](https://starchart.cc/chinabugotech/hutool.svg)](https://starchart.cc/chinabugotech/hutool)

View File

@ -10,6 +10,6 @@
## Reporting a Vulnerability报告漏洞
如果你发现有安全问题或漏洞,请发送邮件到`loolly@aliyun.com`。
如果你发现有安全问题或漏洞,请发送邮件到`bugo@bugotech.cn`。
To report any found security issues or vulnerabilities, please send a mail to `loolly@aliyun.com`.
To report any found security issues or vulnerabilities, please send a mail to `bugo@bugotech.cn`.

View File

@ -29,7 +29,7 @@ public class CglibProxyFactory extends ProxyFactory{
/**
* 创建代理对象<br>
* https://gitee.com/dromara/hutool/issues/I74EX7<br>
* https://gitee.com/chinabugotech/hutool/issues/I74EX7<br>
* 某些对象存在非空参数构造则需遍历查找需要的构造完成代理对象构建
*
* @param <T> 代理对象类型

View File

@ -29,7 +29,7 @@ public class SpringCglibProxyFactory extends ProxyFactory{
/**
* 创建代理对象<br>
* https://gitee.com/dromara/hutool/issues/I74EX7<br>
* https://gitee.com/chinabugotech/hutool/issues/I74EX7<br>
* 某些对象存在非空参数构造则需遍历查找需要的构造完成代理对象构建
*
* @param <T> 代理对象类型

View File

@ -30,7 +30,7 @@ public class IssueI74EX7Test {
}
/**
* https://gitee.com/dromara/hutool/issues/I74EX7<br>
* https://gitee.com/chinabugotech/hutool/issues/I74EX7<br>
* Enhancer.create()默认调用无参构造有参构造或者多个构造没有很好的兼容
*
*/
@ -42,7 +42,7 @@ public class IssueI74EX7Test {
}
/**
* https://gitee.com/dromara/hutool/issues/I74EX7<br>
* https://gitee.com/chinabugotech/hutool/issues/I74EX7<br>
* Enhancer.create()默认调用无参构造有参构造或者多个构造没有很好的兼容
*
*/

View File

@ -4,15 +4,16 @@ import cn.hutool.cache.impl.LRUCache;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* https://github.com/dromara/hutool/issues/1895<br>
* https://github.com/chinabugotech/hutool/issues/1895<br>
* 并发问题测试在5.7.15前LRUCache存在并发问题多线程get后map结构变更导致null的位置不确定
* 并可能引起死锁
*/
@ -21,7 +22,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));

View File

@ -2,10 +2,11 @@ package cn.hutool.cache;
import cn.hutool.cache.impl.WeakCache;
import cn.hutool.core.lang.Console;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class WeakCacheTest {
@Test
@ -25,7 +26,7 @@ public class WeakCacheTest {
@Test
@Disabled
public void removeByGcTest(){
// https://gitee.com/dromara/hutool/issues/I51O7M
// https://gitee.com/chinabugotech/hutool/issues/I51O7M
WeakCache<String, String> cache = new WeakCache<>(-1);
cache.put("a", "1");
cache.put("b", "2");

View File

@ -2199,7 +2199,7 @@ public class CollUtil {
iter = (Iterator) value;
} else if (value instanceof Iterable) {
if(value instanceof Map && BeanUtil.isBean(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{

View File

@ -36,7 +36,7 @@ public class NumberWithFormat extends Number implements TypeConverter {
// 自定义日期格式
if (null != this.format && targetType instanceof Class) {
final Class<?> clazz = (Class<?>) targetType;
// https://gitee.com/dromara/hutool/issues/I6IS5B
// https://gitee.com/chinabugotech/hutool/issues/I6IS5B
if (Date.class.isAssignableFrom(clazz)) {
return new DateConverter((Class<? extends Date>) clazz, format).convert(this.number, null);
} else if (TemporalAccessor.class.isAssignableFrom(clazz)) {

View File

@ -206,7 +206,7 @@ public class TemporalAccessorConverter extends AbstractConverter<TemporalAccesso
final Instant instant;
if (GlobalCustomFormat.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 {

View File

@ -1055,7 +1055,7 @@ public class FileUtil extends PathUtil {
int exceptionsCount = 0;
while (true) {
try {
// https://github.com/dromara/hutool/issues/3103
// https://github.com/chinabugotech/hutool/issues/3103
//File file = File.createTempFile(prefix, suffix, mkdir(dir)).getCanonicalFile();
final File file = PathUtil.createTempFile(prefix, suffix, null == dir ? null : dir.toPath()).toFile().getCanonicalFile();
if (isReCreat) {

View File

@ -17,7 +17,7 @@ import java.util.stream.Stream;
/**
* 复制jdk16中的Optional以及自己进行了一点调整和新增比jdk8中的Optional多了几个实用的函数<br>
* 详细见<a href="https://gitee.com/dromara/hutool/pulls/426">https://gitee.com/dromara/hutool/pulls/426</a>
* 详细见<a href="https://gitee.com/chinabugotech/hutool/pulls/426">https://gitee.com/chinabugotech/hutool/pulls/426</a>
*
* @param <T> 包裹里元素的类型
* @author VampireAchao

View File

@ -146,9 +146,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挂学警港澳使领]))$";

View File

@ -10,7 +10,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

View File

@ -11,7 +11,7 @@ import java.util.Currency;
/**
* 单币种货币类处理货币算术币种和取整
* <p>
* 感谢提供此方法的用户https://github.com/dromara/hutool/issues/605
* 感谢提供此方法的用户https://github.com/chinabugotech/hutool/issues/605
*
* <p>
* 货币类中封装了货币金额和币种目前金额在内部是long类型表示

View File

@ -518,7 +518,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}
* @since 3.0.1

View File

@ -363,7 +363,7 @@ public final class CsvWriter implements Closeable, Flushable, Serializable {
@Override
public void close() {
if(this.config.endingLineBreak){
//https://gitee.com/dromara/hutool/issues/I75K5G
//https://gitee.com/chinabugotech/hutool/issues/I75K5G
writeLine();
}
IoUtil.close(this.writer);

View File

@ -10,7 +10,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

View File

@ -253,7 +253,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
assertFalse(subPersonWithAlias.isBooleana());
assertNull(subPersonWithAlias.getBooleanb());
}
@ -520,7 +520,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() {
@ -597,7 +597,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);
@ -858,7 +858,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.create();
final Map<String, String> filedMap = new HashMap<>();
filedMap.put("name", "sourceId");
@ -931,7 +931,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);
}

View File

@ -10,7 +10,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 {

View File

@ -4,7 +4,7 @@ import static 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 {

View File

@ -5,7 +5,7 @@ import static 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 {

View File

@ -12,7 +12,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(){

View File

@ -8,7 +8,7 @@ import java.util.HashMap;
import java.util.Map;
/**
* https://github.com/dromara/hutool/issues/2697
* https://github.com/chinabugotech/hutool/issues/2697
*/
public class Issue2697Test {

View File

@ -854,7 +854,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),

View File

@ -12,7 +12,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);
}

View File

@ -7,7 +7,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

View File

@ -351,7 +351,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 = Convert.toBigDecimal(str);
assertEquals(str, bigDecimal.toPlainString());
@ -359,7 +359,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.decodeHex(hex2);
final float f = Convert.toFloat(value);

View File

@ -25,7 +25,7 @@ public class CalendarUtilTest {
final Calendar calendar = CalendarUtil.parse("2021-09-27 00:00:112323", false,
DatePattern.NORM_DATETIME_FORMAT);
// https://github.com/dromara/hutool/issues/1849
// https://github.com/chinabugotech/hutool/issues/1849
// 在使用严格模式时秒不正确抛出异常
DateUtil.date(calendar);
});

View File

@ -117,7 +117,7 @@ public class ChineseDateTest {
@Test
public void getChineseMonthTest2(){
//https://github.com/dromara/hutool/issues/2112
//https://github.com/chinabugotech/hutool/issues/2112
ChineseDate springFestival = new ChineseDate(DateUtil.parseDate("2022-02-01"));
final String chineseMonth = springFestival.getChineseMonth();
assertEquals("一月", chineseMonth);
@ -125,7 +125,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);
@ -153,7 +153,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);
assertEquals("1998-06-24 00:00:00", chineseDate.getGregorianDate().toString());

View File

@ -1002,7 +1002,7 @@ public class DateUtilTest {
@Test
public void parseNotFitTest() {
//https://github.com/dromara/hutool/issues/1332
//https://github.com/chinabugotech/hutool/issues/1332
assertThrows(DateException.class, () -> {
// 在日期格式不匹配的时候测试是否正常报错
DateUtil.parse("2020-12-23", DatePattern.PURE_DATE_PATTERN);

View File

@ -5,7 +5,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")

View File

@ -8,7 +8,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();

View File

@ -52,7 +52,7 @@ public class FileCopierTest {
@Test
@Disabled
public void copyFileByRelativePath(){
// https://github.com/dromara/hutool/pull/2188
// https://github.com/chinabugotech/hutool/pull/2188
// 当复制的目标文件位置是相对路径的时候可以通过
FileCopier copier = FileCopier.create(new File("pom.xml"),new File("aaa.txt"));
copier.copy();

View File

@ -76,7 +76,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);

View File

@ -8,7 +8,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

View File

@ -10,7 +10,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 {

View File

@ -7,7 +7,7 @@ import java.lang.reflect.Type;
import java.util.Map;
/**
* https://gitee.com/dromara/hutool/pulls/447/files
* https://gitee.com/chinabugotech/hutool/pulls/447/files
*
* TODO 同时继承泛型和实现泛型接口需要解析此处为F
*/

View File

@ -28,7 +28,7 @@ public class CaseInsensitiveMapTest {
@Test
public void mergeTest(){
//https://github.com/dromara/hutool/issues/2086
//https://github.com/chinabugotech/hutool/issues/2086
Pair<String, String> b = new Pair<>("a", "value");
Pair<String, String> a = new Pair<>("A", "value");
final CaseInsensitiveMap<Object, Object> map = new CaseInsensitiveMap<>();

View File

@ -32,7 +32,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);
}
@ -45,14 +45,14 @@ 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.11, conversion, 0.01);
}
@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);
}

View File

@ -26,7 +26,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);
@ -279,7 +279,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.CHARSET_UTF_8);
@ -298,7 +298,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);
@ -310,7 +310,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";
@ -333,7 +333,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")
@ -359,7 +359,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);
@ -368,7 +368,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");
@ -437,7 +437,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).setCharset(CharsetUtil.CHARSET_UTF_8).toString();
@ -471,7 +471,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("//");

View File

@ -22,7 +22,7 @@ public class UrlDecoderTest {
@Test
public 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";

View File

@ -52,7 +52,7 @@ public class UrlQueryTest {
@Test
public void parseTest4(){
// https://github.com/dromara/hutool/issues/1989
// https://github.com/chinabugotech/hutool/issues/1989
String queryStr = "imageMogr2/thumbnail/x800/format/jpg";
final UrlQuery query = UrlQuery.of(queryStr, CharsetUtil.CHARSET_UTF_8);
assertEquals(queryStr, query.toString());

View File

@ -17,7 +17,7 @@ public class CharSequenceUtilTest {
@Test
public void replaceTest2() {
// https://gitee.com/dromara/hutool/issues/I4M16G
// https://gitee.com/chinabugotech/hutool/issues/I4M16G
String replace = "#{A}";
String result = CharSequenceUtil.replace(replace, "#{AAAAAAA}", "1");
assertEquals(replace, result);
@ -49,7 +49,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);
}
@ -89,7 +89,7 @@ public class CharSequenceUtilTest {
@Test
public void subPreGbkTest() {
// https://gitee.com/dromara/hutool/issues/I4JO2E
// https://gitee.com/chinabugotech/hutool/issues/I4JO2E
String s = "华硕K42Intel酷睿i31代2G以下独立显卡不含机械硬盘固态硬盘120GB-192GB4GB-6GB";
String v = CharSequenceUtil.subPreGbk(s, 40, false);
@ -101,7 +101,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));

View File

@ -35,9 +35,9 @@ 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) -> assertEquals(value, NamingCase.toUnderlineCase(key)));
}

View File

@ -9,7 +9,7 @@ import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* https://gitee.com/dromara/hutool/issues/IA8WE0
* https://gitee.com/chinabugotech/hutool/issues/IA8WE0
*/
public class IssueIA8WE0Test {
@Test

View File

@ -74,7 +74,7 @@ public class StrSplitterTest {
}
/**
* https://github.com/dromara/hutool/issues/2099
* https://github.com/chinabugotech/hutool/issues/2099
*/
@Test
public void splitByRegexTest(){

View File

@ -11,7 +11,7 @@ public class ExecutorBuilderTest {
@Test
@Disabled
public void CallerRunsPolicyTest(){
// https://gitee.com/dromara/hutool/pulls/660
// https://gitee.com/chinabugotech/hutool/pulls/660
final ThreadPoolExecutor executor = ExecutorBuilder.create().setCorePoolSize(1).setMaxPoolSize(1).setHandler(RejectPolicy.BLOCK.getValue()).build();
executor.execute(()-> Console.log("### 1"));
executor.execute(()-> Console.log("### 2"));

View File

@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
public class SyncFinisherTest {
/**
* https://gitee.com/dromara/hutool/issues/I716SX
* https://gitee.com/chinabugotech/hutool/issues/I716SX
* 设置ExceptionHandler捕获异常
*/
@Test
@ -44,7 +44,7 @@ public class SyncFinisherTest {
}
/**
* https://gitee.com/dromara/hutool/issues/I716SX
* https://gitee.com/chinabugotech/hutool/issues/I716SX
* 默认情况下吞掉异常
*/
@Test

View File

@ -39,7 +39,7 @@ public class EscapeUtilTest {
}
/**
* https://gitee.com/dromara/hutool/issues/I49JU8
* https://gitee.com/chinabugotech/hutool/issues/I49JU8
*/
@Test
public void escapeAllTest2(){

View File

@ -45,7 +45,7 @@ public class HexUtilTest {
String a = "0x3544534F444";
assertTrue(HexUtil.isHexNumber(a));
// https://gitee.com/dromara/hutool/issues/I62H7K
// https://gitee.com/chinabugotech/hutool/issues/I62H7K
a = "0x0000000000000001158e460913d00000";
assertTrue(HexUtil.isHexNumber(a));
@ -53,7 +53,7 @@ public class HexUtilTest {
a = "0x0000001000T00001158e460913d00000";
assertFalse(HexUtil.isHexNumber(a));
// 错误的,https://github.com/dromara/hutool/issues/2857
// 错误的,https://github.com/chinabugotech/hutool/issues/2857
a = "-1";
assertFalse(HexUtil.isHexNumber(a));
}

View File

@ -20,7 +20,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 {

View File

@ -416,7 +416,7 @@ public class StrUtilTest {
containsAny = StrUtil.containsAny("aaabbbccc", "d", "c");
assertTrue(containsAny);
// https://gitee.com/dromara/hutool/issues/I7WSYD
// https://gitee.com/chinabugotech/hutool/issues/I7WSYD
containsAny = StrUtil.containsAny("你好啊", "", null);
assertFalse(containsAny);
}
@ -651,7 +651,7 @@ public class StrUtilTest {
@Test
public void issueI6KKFUTest() {
// https://gitee.com/dromara/hutool/issues/I6KKFU
// https://gitee.com/chinabugotech/hutool/issues/I6KKFU
final String template = "I''m {0} years old.";
final String result = StrUtil.indexedFormat(template, 10);
assertEquals("I'm 10 years old.", result);

View File

@ -149,7 +149,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";
//noinspection IOStreamConstructor
@ -164,7 +164,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";

View File

@ -61,7 +61,7 @@ public class KeyUtilTest {
@Test
public void generateSm4KeyTest(){
// https://github.com/dromara/hutool/issues/2150
// https://github.com/chinabugotech/hutool/issues/2150
assertEquals(16, KeyUtil.generateKey("sm4").getEncoded().length);
assertEquals(32, KeyUtil.generateKey("sm4", 256).getEncoded().length);
}

View File

@ -64,7 +64,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"));

View File

@ -6,14 +6,15 @@ import cn.hutool.crypto.digest.mac.SM4MacEngine;
import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.params.ParametersWithIV;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
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());
Mac mac = new Mac(new SM4MacEngine(parameter));
@ -27,7 +28,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());

View File

@ -5,11 +5,12 @@ import cn.hutool.core.util.CharsetUtil;
import cn.hutool.crypto.KeyUtil;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.ZUC;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import javax.crypto.spec.IvParameterSpec;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Hmac单元测试
* @author Looly
@ -84,7 +85,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];
HMac mac = new HMac(HmacAlgorithm.SM4CMAC,
KeyUtil.generateKey("SM4", key));

View File

@ -10,7 +10,7 @@ import java.io.InputStream;
import java.io.OutputStream;
/**
* https://gitee.com/dromara/hutool/issues/I4EMST
* https://gitee.com/chinabugotech/hutool/issues/I4EMST
*/
public class Sm4StreamTest {

View File

@ -148,7 +148,7 @@ public interface Dialect extends Serializable {
* @since 5.7.2
*/
default PreparedStatement psForCount(Connection conn, SqlBuilder sqlBuilder) throws SQLException {
// https://gitee.com/dromara/hutool/issues/I713XQ
// https://gitee.com/chinabugotech/hutool/issues/I713XQ
// 为了兼容informix等数据库此处使用count(*)而非count(1)
sqlBuilder = sqlBuilder
.insertPreFragment("SELECT count(*) from(")

View File

@ -122,7 +122,7 @@ public class DbTest {
@Test
@Disabled
public void queryFetchTest() throws SQLException {
// https://gitee.com/dromara/hutool/issues/I4JXWN
// https://gitee.com/chinabugotech/hutool/issues/I4JXWN
Db.use().query((conn->{
PreparedStatement ps = conn.prepareStatement("select * from table",
ResultSet.TYPE_FORWARD_ONLY,

View File

@ -91,7 +91,7 @@ public class DsTest {
@Test
public void c3p0DsUserAndPassTest() {
// https://gitee.com/dromara/hutool/issues/I4T7XZ
// https://gitee.com/chinabugotech/hutool/issues/I4T7XZ
DSFactory.setCurrentDSFactory(new C3p0DSFactory());
ComboPooledDataSource ds = (ComboPooledDataSource) ((DataSourceWrapper) DSFactory.get("mysql")).getRaw();
assertEquals("root", ds.getUser());

View File

@ -19,7 +19,7 @@ import org.junit.jupiter.api.Test;
import java.sql.SQLException;
/**
* https://gitee.com/dromara/hutool/issues/I73770
* https://gitee.com/chinabugotech/hutool/issues/I73770
*/
public class IssueI73770Test {
@Test

View File

@ -29,7 +29,7 @@ public class JexlEngine implements ExpressionEngine {
try{
return engine.createExpression(expression).evaluate(mapContext);
} catch (Exception ignore){
// https://gitee.com/dromara/hutool/issues/I4B70D
// https://gitee.com/chinabugotech/hutool/issues/I4B70D
// 支持脚本
return engine.createScript(expression).execute(mapContext);
}

View File

@ -208,7 +208,7 @@ public abstract class AbstractFtp implements Closeable {
/**
* 下载文件-避免未完成的文件<br>
* 来自https://gitee.com/dromara/hutool/pulls/407<br>
* 来自https://gitee.com/chinabugotech/hutool/pulls/407<br>
* 此方法原理是先在目标文件同级目录下创建临时文件下载之等下载完毕后重命名避免因下载错误导致的文件不完整
*
* @param path 文件路径

View File

@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@SpringBootTest(classes = {SpringUtil.class, SpringUtilTest.Demo2.class})
// @ActiveProfiles("dev") // SpringUtil.getActiveProfile()效果与下面方式一致
@TestPropertySource(properties = {"spring.profiles.active=dev"})
//@Import(spring.org.dromara.hutool.extra.SpringUtil.class)
public class SpringUtilTest {
/**

View File

@ -3,7 +3,6 @@ package cn.hutool.extra.template;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.extra.template.engine.thymeleaf.ThymeleafEngine;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.thymeleaf.context.Context;
@ -11,12 +10,9 @@ import org.thymeleaf.standard.StandardDialect;
import org.thymeleaf.templateresolver.StringTemplateResolver;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Thymeleaf单元测试
@ -27,7 +23,7 @@ import java.util.Map;
public class ThymeleafTest {
/**
* <a href="https://github.com/dromara/hutool/issues/2530">...</a>
* <a href="https://github.com/chinabugotech/hutool/issues/2530">...</a>
* 自定义操作原始引擎
*/
@Test

View File

@ -124,7 +124,7 @@ public class HttpConnection {
HttpGlobalConfig.allowPatch();
} catch (Exception ignore){
// ignore
// https://github.com/dromara/hutool/issues/2832
// https://github.com/chinabugotech/hutool/issues/2832
}
}
}
@ -277,7 +277,7 @@ public class HttpConnection {
final HttpsURLConnection httpsConn = (HttpsURLConnection) conn;
// 验证域
httpsConn.setHostnameVerifier(ObjectUtil.defaultIfNull(hostnameVerifier,
// CVE-2022-22885 https://github.com/dromara/hutool/issues/2042
// CVE-2022-22885 https://github.com/chinabugotech/hutool/issues/2042
// 增加全局变量可选是否不验证host
HttpGlobalConfig.isTrustAnyHost() ? DefaultSSLInfo.TRUST_ANY_HOSTNAME_VERIFIER : HttpsURLConnection.getDefaultHostnameVerifier()));
httpsConn.setSSLSocketFactory(ObjectUtil.defaultIfNull(ssf, DefaultSSLInfo.DEFAULT_SSF));

View File

@ -69,7 +69,7 @@ public class HttpDownloader {
/**
* 下载文件-避免未完成的文件<br>
* 来自https://gitee.com/dromara/hutool/pulls/407<br>
* 来自https://gitee.com/chinabugotech/hutool/pulls/407<br>
* 此方法原理是先在目标文件同级目录下创建临时文件下载之等下载完毕后重命名避免因下载错误导致的文件不完整
*
* @param url 请求的url

View File

@ -224,7 +224,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

View File

@ -310,7 +310,7 @@ public class HttpRequest extends HttpBase<HttpRequest> {
* 它会验证 SSL 服务器在数字证书中返回的主机名是否与用于连接 SSL 服务器的 URL 主机名相匹配如果主机名不匹配则删除此连接<br>
* 因此weblogic不支持https的sni协议的主机名验证此时需要将此值设置为sun.net.www.protocol.https.Handler对象
* <p>
* 相关issue见<a href="https://gitee.com/dromara/hutool/issues/IMD1X">https://gitee.com/dromara/hutool/issues/IMD1X</a>
* 相关issue见<a href="https://gitee.com/chinabugotech/hutool/issues/IMD1X">https://gitee.com/chinabugotech/hutool/issues/IMD1X</a>
*
* @param urlHandler {@link URLStreamHandler}
* @return this
@ -1303,7 +1303,7 @@ public class HttpRequest extends HttpBase<HttpRequest> {
throw new HttpException(e);
}
// 支持自动重定向时处理cookie
// https://github.com/dromara/hutool/issues/2960
// https://github.com/chinabugotech/hutool/issues/2960
if (config.followRedirectsCookie) {
GlobalCookieManager.store(httpConnection);
}

View File

@ -327,7 +327,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
* 将响应内容写出到文件-避免未完成的文件<br>
* 异步模式下直接读取Http流写出同步模式下将存储在内存中的响应内容写出<br>
* 写出后会关闭Http流异步模式<br>
* 来自https://gitee.com/dromara/hutool/pulls/407<br>
* 来自https://gitee.com/chinabugotech/hutool/pulls/407<br>
* 此方法原理是先在目标文件同级目录下创建临时文件下载之等下载完毕后重命名避免因下载错误导致的文件不完整
*
* @param targetFileOrDir 写出到的文件或目录

View File

@ -72,7 +72,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 被封了
String token = "test";
String url = "https://sm.ms/api/v2/upload";

View File

@ -1,8 +1,9 @@
package cn.hutool.http.useragent;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class UserAgentUtilTest {
@Test
@ -204,7 +205,7 @@ public class UserAgentUtilTest {
}
/**
* https://github.com/dromara/hutool/issues/1177
* https://github.com/chinabugotech/hutool/issues/1177
*/
@Test
public void parseMicroMessengerTest() {
@ -361,7 +362,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());
@ -376,7 +377,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);
@ -407,7 +408,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());
@ -438,7 +439,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() {

View File

@ -148,7 +148,7 @@ public class ObjectMapper {
if (bytesSource.length > 1 && '[' == bytesSource[0] && ']' == bytesSource[bytesSource.length - 1]) {
mapFromTokener(new JSONTokener(IoUtil.toStream(bytesSource), jsonArray.getConfig()), jsonArray, filter);
}else{
// https://github.com/dromara/hutool/issues/2369
// https://github.com/chinabugotech/hutool/issues/2369
// 非标准的二进制流则按照普通数组对待
for(final byte b : bytesSource){
jsonArray.add(b);

View File

@ -10,7 +10,7 @@ import java.time.LocalTime;
import java.time.Month;
/**
* https://github.com/dromara/hutool/issues/2090
* https://github.com/chinabugotech/hutool/issues/2090
*/
public class Issue2090Test {

View File

@ -12,7 +12,7 @@ import java.util.List;
import java.util.stream.Stream;
/**
* https://github.com/dromara/hutool/issues/2131<br>
* https://github.com/chinabugotech/hutool/issues/2131<br>
* 字段定义成final意味着setCollections无效因此JSON转Bean的时候无法调用setCollections注入所以是空的
*/
public class Issue2131Test {

View File

@ -7,7 +7,7 @@ public class Issue2369Test {
@Test
public void toJsonStrTest(){
//https://github.com/dromara/hutool/issues/2369
//https://github.com/chinabugotech/hutool/issues/2369
// byte[]数组对于JSONArray来说即可能是一个JSON字符串的二进制流也可能是普通数组因此需要做双向兼容
final byte[] bytes = {10, 11};
final String s = JSONUtil.toJsonStr(bytes);

View File

@ -1,12 +1,13 @@
package cn.hutool.json;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class Issue2997Test {
@Test
public void toBeanTest() {
// https://github.com/dromara/hutool/issues/2997
// https://github.com/chinabugotech/hutool/issues/2997
final Object o = JSONUtil.toBean("{}", Object.class);
assertEquals(JSONObject.class, o.getClass());
}

View File

@ -17,7 +17,7 @@ import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
/**
* https://github.com/dromara/hutool/issues/3051
* https://github.com/chinabugotech/hutool/issues/3051
*/
public class Issue3051Test {
@Test

View File

@ -1,11 +1,13 @@
package cn.hutool.json;
import lombok.Data;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* https://github.com/dromara/hutool/issues/3504
* https://github.com/chinabugotech/hutool/issues/3504
*/
public class Issue3504Test {

View File

@ -1,11 +1,13 @@
package cn.hutool.json;
import lombok.Data;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* https://github.com/dromara/hutool/issues/3506
* https://github.com/chinabugotech/hutool/issues/3506
*/
public class Issue3506Test {

View File

@ -3,13 +3,14 @@ package cn.hutool.json;
import cn.hutool.core.convert.Convert;
import lombok.Data;
import lombok.EqualsAndHashCode;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.stream.Stream;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* https://gitee.com/dromara/hutool/issues/I49VZB
* https://gitee.com/chinabugotech/hutool/issues/I49VZB
*/
public class IssueI49VZBTest {
public enum NBCloudKeyType {

View File

@ -4,7 +4,7 @@ import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
/**
* https://gitee.com/dromara/hutool/issues/I4RBZ4
* https://gitee.com/chinabugotech/hutool/issues/I4RBZ4
*/
public class IssueI4RBZ4Test {

View File

@ -9,7 +9,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* https://gitee.com/dromara/hutool/issues/I4XFMW
* https://gitee.com/chinabugotech/hutool/issues/I4XFMW
*/
public class IssueI4XFMWTest {

View File

@ -10,7 +10,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* https://gitee.com/dromara/hutool/issues/I7M2GZ
* https://gitee.com/chinabugotech/hutool/issues/I7M2GZ
*/
public class IssueI7M2GZTest {

View File

@ -232,7 +232,7 @@ public class JSONArrayTest {
assertEquals(1, 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();

View File

@ -2,13 +2,14 @@ package cn.hutool.json;
import lombok.Data;
import lombok.EqualsAndHashCode;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class JSONSupportTest {
/**
* https://github.com/dromara/hutool/issues/1779
* https://github.com/chinabugotech/hutool/issues/1779
* 在JSONSupport的JSONBeanParse中如果使用json.toBean会导致JSONBeanParse.parse方法反复递归调用最终栈溢出<br>
* 因此parse方法默认实现必须避开JSONBeanParse.parse调用
*/

View File

@ -226,7 +226,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.createObj().set("test", new SQLException("test"));
assertEquals("{\"test\":\"java.sql.SQLException: test\"}", set.toString());

View File

@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test;
import java.security.KeyPair;
/**
*https://github.com/dromara/hutool/issues/3205
*https://github.com/chinabugotech/hutool/issues/3205
*/
public class Issue3205Test {
@Test

View File

@ -47,7 +47,7 @@ public class JWTUtilTest {
@Test
public void parseNullTest(){
assertThrows(IllegalArgumentException.class, () -> {
// https://gitee.com/dromara/hutool/issues/I5OCQB
// https://gitee.com/chinabugotech/hutool/issues/I5OCQB
JWTUtil.parseToken(null);
});
}

View File

@ -102,7 +102,7 @@ public class ExcelPicUtil {
ctMarker = pic.getPreferredSize().getFrom();
sheetIndexPicMap.put(StrUtil.format("{}_{}", ctMarker.getRow(), ctMarker.getCol()), pic.getPictureData());
}
// 其他类似于图表等忽略see: https://gitee.com/dromara/hutool/issues/I38857
// 其他类似于图表等忽略see: https://gitee.com/chinabugotech/hutool/issues/I38857
}
}
}

View File

@ -25,7 +25,7 @@ public class NumberCellSetter implements CellSetter {
@Override
public void setValue(Cell cell) {
// issue https://gitee.com/dromara/hutool/issues/I43U9G
// issue https://gitee.com/chinabugotech/hutool/issues/I43U9G
// 避免float到double的精度问题
cell.setCellValue(NumberUtil.toDouble(value));
}

View File

@ -178,7 +178,7 @@ public class SheetDataSaxHandler extends DefaultHandler {
*/
private void startRow(Attributes attributes) {
final String rValue = AttributeName.r.getValue(attributes);
// https://gitee.com/dromara/hutool/issues/I6WYF6
// https://gitee.com/chinabugotech/hutool/issues/I6WYF6
this.rowNumber = (null == rValue) ? -1 : Long.parseLong(rValue) - 1;
}

View File

@ -247,7 +247,7 @@ public class ExcelReadTest {
@Test
public void readColumnNPETest() {
// https://github.com/dromara/hutool/pull/2234
// https://github.com/chinabugotech/hutool/pull/2234
ExcelReader reader = ExcelUtil.getReader(ResourceUtil.getStream("read_row_npe.xlsx"));
reader.readColumn(0, 1);
}

View File

@ -721,7 +721,7 @@ public class ExcelWriteTest {
@Test
@Disabled
public void mergeTest3() {
// https://github.com/dromara/hutool/issues/1696
// https://github.com/chinabugotech/hutool/issues/1696
List<Map<String, Object>> list = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
@ -751,7 +751,7 @@ public class ExcelWriteTest {
@Test
@Disabled
public void mergeForDateTest() {
// https://github.com/dromara/hutool/issues/1911
// https://github.com/chinabugotech/hutool/issues/1911
//通过工具类创建writer
String path = "d:/test/mergeForDate.xlsx";
@ -776,7 +776,7 @@ public class ExcelWriteTest {
@Test
@Disabled
public void writeFloatTest() {
//issue https://gitee.com/dromara/hutool/issues/I43U9G
//issue https://gitee.com/chinabugotech/hutool/issues/I43U9G
String path = "d:/test/floatTest.xlsx";
FileUtil.del(path);
@ -788,7 +788,7 @@ public class ExcelWriteTest {
@Test
@Disabled
public void issueI466ZZTest() {
// https://gitee.com/dromara/hutool/issues/I466ZZ
// https://gitee.com/chinabugotech/hutool/issues/I466ZZ
// 需要输出S_20000314_x5116_0004
// 此处加入一个转义前缀_x005F
List<Object> row = ListUtil.of(new EscapeStrCellSetter("S_20000314_x5116_0004"));
@ -801,7 +801,7 @@ public class ExcelWriteTest {
@Test
@Disabled
public void writeLongTest() {
//https://gitee.com/dromara/hutool/issues/I49R6U
//https://gitee.com/chinabugotech/hutool/issues/I49R6U
final ExcelWriter writer = ExcelUtil.getWriter("d:/test/long.xlsx");
writer.write(ListUtil.of(1427545395336093698L));
writer.close();

View File

@ -11,7 +11,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* https://github.com/dromara/hutool/issues/3048
* https://github.com/chinabugotech/hutool/issues/3048
* Excel导出javaBean中有BigDecimal类型精度流失
*
*/

Some files were not shown because too many files have changed in this diff Show More