mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -214,6 +214,8 @@ public class Setting extends AbsSetting implements Map<String, String> {
|
||||
// 先关闭之前的监听
|
||||
IoUtil.closeQuietly(this.watchMonitor);
|
||||
this.watchMonitor = WatchUtil.ofModify(resource.getUrl(), new SimpleWatcher() {
|
||||
private static final long serialVersionUID = 5190107321461226190L;
|
||||
|
||||
@Override
|
||||
public void onModify(final WatchEvent<?> event, final WatchKey key) {
|
||||
final boolean success = load();
|
||||
|
@@ -231,6 +231,8 @@ public final class Props extends Properties implements TypeGetter<CharSequence>
|
||||
// 先关闭之前的监听
|
||||
IoUtil.closeQuietly(this.watchMonitor);
|
||||
this.watchMonitor = WatchUtil.ofModify(this.resource.getUrl(), new SimpleWatcher() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void onModify(final WatchEvent<?> event, final WatchKey key) {
|
||||
load();
|
||||
|
@@ -15,6 +15,7 @@ package org.dromara.hutool.setting.toml;
|
||||
import org.dromara.hutool.core.array.ArrayUtil;
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
import org.dromara.hutool.core.text.CharUtil;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.dromara.hutool.setting.SettingException;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -199,7 +200,7 @@ public class TomlWriter {
|
||||
indent();
|
||||
writeKey(name);
|
||||
write(" = ");
|
||||
writeString(ArrayUtil.toString(array));
|
||||
writeString(StrUtil.emptyIfNull(ArrayUtil.toString(array)));
|
||||
}
|
||||
} else if (value instanceof Map) {// table
|
||||
if (simpleValues) {
|
||||
|
@@ -13,7 +13,6 @@
|
||||
package org.dromara.hutool.setting.toml;
|
||||
|
||||
import org.dromara.hutool.core.io.resource.ResourceUtil;
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
Reference in New Issue
Block a user