From d6c6d30776c9fef3effbb2dd3f5cba8063c2bf6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 11 Nov 2023 00:08:05 +0100 Subject: [PATCH] checkstyle fix --- src/com/jpexs/decompiler/flash/gui/DebugPanel.java | 5 ++--- src/com/jpexs/decompiler/flash/gui/Main.java | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/DebugPanel.java b/src/com/jpexs/decompiler/flash/gui/DebugPanel.java index 04e676f63..b0603c920 100644 --- a/src/com/jpexs/decompiler/flash/gui/DebugPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/DebugPanel.java @@ -22,7 +22,6 @@ import com.jpexs.debugger.flash.messages.in.InConstantPool; import com.jpexs.debugger.flash.messages.in.InFrame; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.gui.DebuggerHandler.BreakListener; -import static com.jpexs.decompiler.flash.gui.Main.getDefaultMessagesComponent; import com.jpexs.decompiler.flash.gui.abc.ABCPanel; import com.jpexs.helpers.Helper; import de.hameister.treetable.MyTreeTable; @@ -197,7 +196,7 @@ public class DebugPanel extends JPanel { Configuration.lastExportDir.set(file.getParentFile().getAbsolutePath()); } catch (IOException ex) { Logger.getLogger(DebugPanel.class.getName()).log(Level.SEVERE, null, ex); - ViewMessages.showMessageDialog(getDefaultMessagesComponent(), AppStrings.translate("error.file.save") + ": " + ex.getLocalizedMessage(), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE); + ViewMessages.showMessageDialog(Main.getDefaultMessagesComponent(), AppStrings.translate("error.file.save") + ": " + ex.getLocalizedMessage(), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE); } } }); @@ -217,7 +216,7 @@ public class DebugPanel extends JPanel { Main.debugImportByteArray(v, fis); } catch (IOException ex) { Logger.getLogger(DebugPanel.class.getName()).log(Level.SEVERE, null, ex); - ViewMessages.showMessageDialog(getDefaultMessagesComponent(), AppStrings.translate("error.file.save") + ": " + ex.getLocalizedMessage(), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE); + ViewMessages.showMessageDialog(Main.getDefaultMessagesComponent(), AppStrings.translate("error.file.save") + ": " + ex.getLocalizedMessage(), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE); } } }); diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index 9b80c90a8..acf0c5806 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -300,10 +300,10 @@ public class Main { } Object oldPos = getDebugHandler().getVariable(objectId, "position", false, true).parent.value; getDebugHandler().setVariable(objectId, "position", VariableType.NUMBER, 0); - int length = (int)(double)(Double)getDebugHandler().getVariable(objectId, "length", false, true).parent.value; + int length = (int) (double) (Double) getDebugHandler().getVariable(objectId, "length", false, true).parent.value; for (int i = 0; i < length; i++) { - int b = (int)(double)(Double)getDebugHandler().callFunction(false, "readByte", v, new ArrayList<>()).variables.get(0).value; + int b = (int) (double) (Double) getDebugHandler().callFunction(false, "readByte", v, new ArrayList<>()).variables.get(0).value; os.write(b); } getDebugHandler().setVariable(objectId, "position", VariableType.NUMBER, oldPos); @@ -325,7 +325,7 @@ public class Main { int length = 0; int b; while ((b = is.read()) > -1) { - getDebugHandler().callFunction(false, "writeByte", v, Arrays.asList((Double)(double) b)); + getDebugHandler().callFunction(false, "writeByte", v, Arrays.asList((Double) (double) b)); length++; } if (oldPos > length) {