mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
change link
This commit is contained in:
@@ -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);
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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);
|
||||
|
@@ -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());
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -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 {
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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调用。
|
||||
*/
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user