fix: 同步调整 SshAuthInfoSerializer 实例获取方式.

从原来的创建新实例修改为获取单例, 适配修改.
This commit is contained in:
LamGC 2021-08-15 13:57:45 +08:00
parent 33967c675b
commit 0d38fedc42
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -11,7 +11,7 @@ import static org.junit.jupiter.api.Assertions.*;
class SshAuthInfoSerializerTest {
private final static Gson gson = new GsonBuilder()
.registerTypeAdapter(SshAuthInfo.class, new SshAuthInfoSerializer())
.registerTypeAdapter(SshAuthInfo.class, SshAuthInfoSerializer.INSTANCE)
.create();
private JsonObject getPasswordAuthObject() {