mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-04 23:53:20 +08:00
perf: equals "" can be isEmpty here
This commit is contained in:
parent
1e2ccc9fc6
commit
aeadf6bba7
@ -89,7 +89,7 @@ public final class SceneGroup {
|
||||
this.bindings = ScriptLoader.getEngine().createBindings();
|
||||
|
||||
CompiledScript cs;
|
||||
if (overrideScriptPath != null && !overrideScriptPath.equals("")) {
|
||||
if (overrideScriptPath != null && !overrideScriptPath.isEmpty()) {
|
||||
cs = ScriptLoader.getScript(overrideScriptPath, true);
|
||||
} else {
|
||||
cs =
|
||||
|
@ -184,7 +184,7 @@ public final class GameServer extends KcpServer implements Iterable<Player> {
|
||||
|
||||
private static InetSocketAddress getAdapterInetSocketAddress() {
|
||||
InetSocketAddress inetSocketAddress;
|
||||
if (GAME_INFO.bindAddress.equals("")) {
|
||||
if (GAME_INFO.bindAddress.isEmpty()) {
|
||||
inetSocketAddress = new InetSocketAddress(GAME_INFO.bindPort);
|
||||
} else {
|
||||
inetSocketAddress = new InetSocketAddress(GAME_INFO.bindAddress, GAME_INFO.bindPort);
|
||||
|
Loading…
Reference in New Issue
Block a user