refactor rename

This commit is contained in:
Anthony Calosa
2019-11-01 17:46:14 +08:00
parent a80c683901
commit 3b58d6df42
7 changed files with 8 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ public final class Main {
GuiBase.setInterface(new GuiDesktop()); GuiBase.setInterface(new GuiDesktop());
//set PropertyConfig log4j to true //set PropertyConfig log4j to true
GuiBase.setpropertyConfig(true); GuiBase.enablePropertyConfig(true);
//install our error handler //install our error handler
ExceptionHandler.registerErrorHandling(); ExceptionHandler.registerErrorHandling();

View File

@@ -72,7 +72,7 @@ public class Forge implements ApplicationListener {
clipboard = clipboard0; clipboard = clipboard0;
deviceAdapter = deviceAdapter0; deviceAdapter = deviceAdapter0;
GuiBase.setInterface(new GuiMobile(assetDir0)); GuiBase.setInterface(new GuiMobile(assetDir0));
GuiBase.setpropertyConfig(value); GuiBase.enablePropertyConfig(value);
} }
return app; return app;
} }

View File

@@ -13,7 +13,7 @@ public class GuiBase {
public static void setInterface(IGuiBase i0) { public static void setInterface(IGuiBase i0) {
guiInterface = i0; guiInterface = i0;
} }
public static void setpropertyConfig(boolean value) { public static void enablePropertyConfig(boolean value) {
propertyConfig = value; propertyConfig = value;
} }
public static boolean isNetworkplay() { public static boolean isNetworkplay() {
@@ -22,7 +22,7 @@ public class GuiBase {
public static void setNetworkplay(boolean value) { public static void setNetworkplay(boolean value) {
networkplay = value; networkplay = value;
} }
public static boolean getpropertyConfig() { public static boolean hasPropertyConfig() {
return propertyConfig; return propertyConfig;
} }
} }

View File

@@ -27,7 +27,7 @@ public class CustomObjectDecoder extends LengthFieldBasedFrameDecoder {
if (frame == null) { if (frame == null) {
return null; return null;
} else { } else {
if (GuiBase.getpropertyConfig()){ if (GuiBase.hasPropertyConfig()){
ElsaObjectInputStream ois = new ElsaObjectInputStream(new ByteBufInputStream(frame, true)); ElsaObjectInputStream ois = new ElsaObjectInputStream(new ByteBufInputStream(frame, true));
Object var5; Object var5;

View File

@@ -20,7 +20,7 @@ public class CustomObjectEncoder extends MessageToByteEncoder<Serializable> {
int startIdx = out.writerIndex(); int startIdx = out.writerIndex();
ByteBufOutputStream bout = new ByteBufOutputStream(out); ByteBufOutputStream bout = new ByteBufOutputStream(out);
if (GuiBase.getpropertyConfig()){ if (GuiBase.hasPropertyConfig()){
ElsaObjectOutputStream oout = null; ElsaObjectOutputStream oout = null;
try { try {
bout.write(LENGTH_PLACEHOLDER); bout.write(LENGTH_PLACEHOLDER);

View File

@@ -156,7 +156,7 @@ public enum ProtocolMethod {
} }
public void checkArgs(final Object[] args) { public void checkArgs(final Object[] args) {
if (GuiBase.getpropertyConfig()) if (GuiBase.hasPropertyConfig())
return; //uses custom serializer for Android 8+.. return; //uses custom serializer for Android 8+..
for (int iArg = 0; iArg < args.length; iArg++) { for (int iArg = 0; iArg < args.length; iArg++) {
Object arg = null; Object arg = null;

View File

@@ -87,7 +87,7 @@ public final class FServerManager {
*/ */
public static FServerManager getInstance() { public static FServerManager getInstance() {
if (instance == null) { if (instance == null) {
if(GuiBase.getpropertyConfig()) if(GuiBase.hasPropertyConfig())
PropertyConfigurator.configure(ForgeConstants.ASSETS_DIR + "/src/main/resources/log4jConfig.config"); PropertyConfigurator.configure(ForgeConstants.ASSETS_DIR + "/src/main/resources/log4jConfig.config");
instance = new FServerManager(); instance = new FServerManager();
} }