mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -14,6 +14,7 @@ package org.dromara.hutool.json;
|
||||
|
||||
import org.dromara.hutool.core.io.IoUtil;
|
||||
import org.dromara.hutool.core.io.ReaderWrapper;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.dromara.hutool.json.mapper.JSONValueMapper;
|
||||
|
||||
@@ -76,7 +77,7 @@ public class JSONTokener extends ReaderWrapper {
|
||||
* @param config JSON配置
|
||||
*/
|
||||
public JSONTokener(final CharSequence s, final JSONConfig config) {
|
||||
this(new StringReader(StrUtil.str(s)), config);
|
||||
this(new StringReader(Assert.notBlank(s).toString()), config);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,7 +87,7 @@ public class JSONTokener extends ReaderWrapper {
|
||||
* @param config JSON配置
|
||||
*/
|
||||
public JSONTokener(final Reader reader, final JSONConfig config) {
|
||||
super(IoUtil.toMarkSupport(reader));
|
||||
super(IoUtil.toMarkSupport(Assert.notNull(reader)));
|
||||
this.eof = false;
|
||||
this.usePrevious = false;
|
||||
this.previous = 0;
|
||||
|
Reference in New Issue
Block a user