From def596a5e8830640ac84ea405ae69f3b7e137829 Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Wed, 22 Feb 2023 10:19:06 +0100 Subject: [PATCH 1/3] Improve POM --- pom.xml | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index c2f41edd..f3310a68 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ UTF-8 - 23.1.0 + 24.0.0 4.9.3 2.7.0 9.4 @@ -30,10 +30,10 @@ 1.10.0 3.0.2 0.4.1 - 6.1.0.Final + 6.1.2.Final v59 e0d44f4 - 2.10 + 2.10.1 31.1-jre 2.1.0 4.2 @@ -44,10 +44,10 @@ 3.3 0.2.0 0.6.0 - 3.3.0 + 3.3.2 2.1.1 - 2.0.5 - 2.5.2 + 2.0.6 + 403e90375e 1.33.0 1.0.3 0.2.2 @@ -95,8 +95,8 @@ ${apktool.version} - com.konloch - safeyaml + org.yaml + snakeyaml @@ -277,12 +277,12 @@ ${slf4j.version} - org.smali + com.github.iBotPeaches.smali smali ${smali.version} - org.smali + com.github.iBotPeaches.smali baksmali ${smali.version} @@ -320,11 +320,23 @@ io.github.skylot jadx-dex-input ${jadx.version} + + + org.smali + baksmali + + io.github.skylot jadx-smali-input ${jadx.version} + + + org.smali + smali + + com.github.ThexXTURBOXx From f006a3a0e64fe8661be764e473b73136c5ba02be Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Wed, 22 Feb 2023 10:40:35 +0100 Subject: [PATCH 2/3] Fix many DnD errors related to #462 --- .../resourceviewer/DraggableTabbedPane.java | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DraggableTabbedPane.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DraggableTabbedPane.java index 14048d52..b6cc821b 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DraggableTabbedPane.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DraggableTabbedPane.java @@ -127,8 +127,11 @@ public class DraggableTabbedPane extends JTabbedPane { } private TabTransferData getTabTransferData(DropTargetDropEvent a_event) { + Transferable t = a_event.getTransferable(); + if (!t.isDataFlavorSupported(FLAVOR)) return null; + try { - return (TabTransferData) a_event.getTransferable().getTransferData(FLAVOR); + return (TabTransferData) t.getTransferData(FLAVOR); } catch (Exception e) { e.printStackTrace(); } @@ -137,8 +140,11 @@ public class DraggableTabbedPane extends JTabbedPane { } private TabTransferData getTabTransferData(DropTargetDragEvent a_event) { + Transferable t = a_event.getTransferable(); + if (!t.isDataFlavorSupported(FLAVOR)) return null; + try { - return (TabTransferData) a_event.getTransferable().getTransferData(FLAVOR); + return (TabTransferData) t.getTransferData(FLAVOR); } catch (Exception e) { e.printStackTrace(); } @@ -147,8 +153,11 @@ public class DraggableTabbedPane extends JTabbedPane { } private TabTransferData getTabTransferData(DragSourceDragEvent a_event) { + Transferable t = a_event.getDragSourceContext().getTransferable(); + if (!t.isDataFlavorSupported(FLAVOR)) return null; + try { - return (TabTransferData) a_event.getDragSourceContext().getTransferable().getTransferData(FLAVOR); + return (TabTransferData) t.getTransferData(FLAVOR); } catch (Exception e) { e.printStackTrace(); } @@ -266,6 +275,7 @@ public class DraggableTabbedPane extends JTabbedPane { public void dragOver(final DropTargetDragEvent e) { TabTransferData data = getTabTransferData(e); + if (data == null) return; if (getTabPlacement() == JTabbedPane.TOP || getTabPlacement() == JTabbedPane.BOTTOM) { @@ -309,6 +319,7 @@ public class DraggableTabbedPane extends JTabbedPane { } // if TabTransferData data = getTabTransferData(e); + if (data == null) return false; if (DraggableTabbedPane.this == data.getTabbedPane() && data.getTabIndex() >= 0) { @@ -336,6 +347,7 @@ public class DraggableTabbedPane extends JTabbedPane { } // if TabTransferData data = getTabTransferData(e); + if (data == null) return false; if (DraggableTabbedPane.this == data.getTabbedPane() && data.getTabIndex() >= 0) { @@ -403,6 +415,7 @@ public class DraggableTabbedPane extends JTabbedPane { } private void convertTab(TabTransferData a_data, int a_targetIndex) { + if (a_data == null) return; DraggableTabbedPane source = a_data.getTabbedPane(); int sourceIndex = a_data.getTabIndex(); if (sourceIndex < 0) { @@ -459,6 +472,7 @@ public class DraggableTabbedPane extends JTabbedPane { m_isDrawRect = false; return; } // if + if (a_data == null) return; if ((a_data.getTabbedPane() == this) && (a_data.getTabIndex() == next @@ -492,6 +506,7 @@ public class DraggableTabbedPane extends JTabbedPane { m_isDrawRect = false; return; } // if + if (a_data == null) return; if ((a_data.getTabbedPane() == this) && (a_data.getTabIndex() == next From 5c1be3d9339ea1ca872e0c3cd146949b9d005f8f Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Wed, 22 Feb 2023 10:40:46 +0100 Subject: [PATCH 3/3] Should we do this? --- .../java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index a1e36460..44f44335 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -196,7 +196,7 @@ public class BytecodeViewer //setup swing components viewer = new MainViewerGUI(); - SwingUtilities.updateComponentTreeUI(viewer); + //SwingUtilities.updateComponentTreeUI(viewer); //load settings and set swing components state SettingsSerializer.loadSettings();