This commit is contained in:
Looly
2023-03-13 01:11:43 +08:00
parent f05e084a3b
commit 5b559d19bd
94 changed files with 320 additions and 309 deletions

View File

@@ -1,7 +1,6 @@
package cn.hutool.setting;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.net.url.URLUtil;
import cn.hutool.core.text.StrUtil;
@@ -183,10 +182,9 @@ public class GroupedSet extends HashMap<String, LinkedHashSet<String>> {
* 加载设置文件。 此方法不会关闭流对象
*
* @param settingStream 文件流
* @return 加载成功与否
* @throws IOException IO异常
*/
public boolean load(final InputStream settingStream) throws IOException {
public void load(final InputStream settingStream) throws IOException {
super.clear();
BufferedReader reader = null;
try {
@@ -233,7 +231,6 @@ public class GroupedSet extends HashMap<String, LinkedHashSet<String>> {
} finally {
IoUtil.close(reader);
}
return true;
}
/**

View File

@@ -96,10 +96,9 @@ public class SettingLoader {
* 加载设置文件。 此方法不会关闭流对象
*
* @param settingStream 文件流
* @return 加载成功与否
* @throws IOException IO异常
*/
synchronized public boolean load(final InputStream settingStream) throws IOException {
synchronized public void load(final InputStream settingStream) throws IOException {
this.groupedMap.clear();
LineReader reader = null;
try {
@@ -141,7 +140,6 @@ public class SettingLoader {
} finally {
IoUtil.close(reader);
}
return true;
}
/**