perf: equals "" can be isEmpty here

This commit is contained in:
Breno A. 2024-06-09 09:45:05 -03:00
parent 1e2ccc9fc6
commit aeadf6bba7
2 changed files with 2 additions and 2 deletions

View File

@ -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 =

View File

@ -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);