mirror of
https://e.coding.net/circlecloud/YumCore.git
synced 2024-11-24 02:08:48 +00:00
fix: 修复断言类空指针异常
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
9ae8b285e6
commit
0e4051f15d
@ -41,6 +41,6 @@ public class Assert<T> {
|
||||
}
|
||||
|
||||
public void runIsAssignable(Class clazz, Consumer<? super T> consumer) {
|
||||
runIsTrue(clazz.isAssignableFrom(t.getClass()), () -> consumer.accept(t));
|
||||
runIsTrue(t != null && clazz.isAssignableFrom(t.getClass()), () -> consumer.accept(t));
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ import pw.yumc.YumCore.bukkit.Log;
|
||||
public class ServerPingTest {
|
||||
@Test
|
||||
public void test() {
|
||||
val ping = new ServerPing("server.yumc.pw");
|
||||
val ping = new ServerPing("play.i5mc.com");
|
||||
ping.fetchData();
|
||||
Log.i("version: %s max: %s online: %s motd: %s",
|
||||
ping.getVersionName(), ping.getPlayersMax(), ping.getPlayersOnline(), ping.getMotd());
|
||||
|
Loading…
Reference in New Issue
Block a user