Merge pull request #468 from ThexXTURBOXx/master

Fix warnings and errors
This commit is contained in:
Konloch 2023-03-25 02:46:50 -06:00 committed by GitHub
commit ca894b3d16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 14 deletions

32
pom.xml
View file

@ -13,7 +13,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Dependency versions --> <!-- Dependency versions -->
<annotations.version>23.1.0</annotations.version> <annotations.version>24.0.0</annotations.version>
<antlr4.version>4.9.3</antlr4.version> <antlr4.version>4.9.3</antlr4.version>
<apktool.version>2.7.0</apktool.version> <apktool.version>2.7.0</apktool.version>
<asm.version>9.4</asm.version> <asm.version>9.4</asm.version>
@ -30,10 +30,10 @@
<commons-text.version>1.10.0</commons-text.version> <commons-text.version>1.10.0</commons-text.version>
<darklaf.version>3.0.2</darklaf.version> <darklaf.version>3.0.2</darklaf.version>
<darklaf-extensions-rsta.version>0.4.1</darklaf-extensions-rsta.version> <darklaf-extensions-rsta.version>0.4.1</darklaf-extensions-rsta.version>
<decompiler-fernflower.version>6.1.0.Final</decompiler-fernflower.version> <decompiler-fernflower.version>6.1.2.Final</decompiler-fernflower.version>
<dex2jar.version>v59</dex2jar.version> <dex2jar.version>v59</dex2jar.version>
<fernflower.version>e0d44f4</fernflower.version> <fernflower.version>e0d44f4</fernflower.version>
<gson.version>2.10</gson.version> <gson.version>2.10.1</gson.version>
<guava.version>31.1-jre</guava.version> <guava.version>31.1-jre</guava.version>
<httprequest.version>2.1.0</httprequest.version> <httprequest.version>2.1.0</httprequest.version>
<imgscalr-lib.version>4.2</imgscalr-lib.version> <imgscalr-lib.version>4.2</imgscalr-lib.version>
@ -44,10 +44,10 @@
<objenesis.version>3.3</objenesis.version> <objenesis.version>3.3</objenesis.version>
<paged-data.version>0.2.0</paged-data.version> <paged-data.version>0.2.0</paged-data.version>
<procyon.version>0.6.0</procyon.version> <procyon.version>0.6.0</procyon.version>
<rsyntaxtextarea.version>3.3.0</rsyntaxtextarea.version> <rsyntaxtextarea.version>3.3.2</rsyntaxtextarea.version>
<semantic-version.version>2.1.1</semantic-version.version> <semantic-version.version>2.1.1</semantic-version.version>
<slf4j.version>2.0.5</slf4j.version> <slf4j.version>2.0.6</slf4j.version>
<smali.version>2.5.2</smali.version> <smali.version>403e90375e</smali.version>
<safeyaml.version>1.33.0</safeyaml.version> <safeyaml.version>1.33.0</safeyaml.version>
<treelayout.version>1.0.3</treelayout.version> <treelayout.version>1.0.3</treelayout.version>
<webp-imageio.version>0.2.2</webp-imageio.version> <webp-imageio.version>0.2.2</webp-imageio.version>
@ -95,8 +95,8 @@
<version>${apktool.version}</version> <version>${apktool.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>com.konloch</groupId> <groupId>org.yaml</groupId>
<artifactId>safeyaml</artifactId> <artifactId>snakeyaml</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -277,12 +277,12 @@
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.smali</groupId> <groupId>com.github.iBotPeaches.smali</groupId>
<artifactId>smali</artifactId> <artifactId>smali</artifactId>
<version>${smali.version}</version> <version>${smali.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.smali</groupId> <groupId>com.github.iBotPeaches.smali</groupId>
<artifactId>baksmali</artifactId> <artifactId>baksmali</artifactId>
<version>${smali.version}</version> <version>${smali.version}</version>
</dependency> </dependency>
@ -320,11 +320,23 @@
<groupId>io.github.skylot</groupId> <groupId>io.github.skylot</groupId>
<artifactId>jadx-dex-input</artifactId> <artifactId>jadx-dex-input</artifactId>
<version>${jadx.version}</version> <version>${jadx.version}</version>
<exclusions>
<exclusion>
<groupId>org.smali</groupId>
<artifactId>baksmali</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.skylot</groupId> <groupId>io.github.skylot</groupId>
<artifactId>jadx-smali-input</artifactId> <artifactId>jadx-smali-input</artifactId>
<version>${jadx.version}</version> <version>${jadx.version}</version>
<exclusions>
<exclusion>
<groupId>org.smali</groupId>
<artifactId>smali</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.ThexXTURBOXx</groupId> <groupId>com.github.ThexXTURBOXx</groupId>

View file

@ -196,7 +196,7 @@ public class BytecodeViewer
//setup swing components //setup swing components
viewer = new MainViewerGUI(); viewer = new MainViewerGUI();
SwingUtilities.updateComponentTreeUI(viewer); //SwingUtilities.updateComponentTreeUI(viewer);
//load settings and set swing components state //load settings and set swing components state
SettingsSerializer.loadSettings(); SettingsSerializer.loadSettings();

View file

@ -127,8 +127,11 @@ public class DraggableTabbedPane extends JTabbedPane {
} }
private TabTransferData getTabTransferData(DropTargetDropEvent a_event) { private TabTransferData getTabTransferData(DropTargetDropEvent a_event) {
Transferable t = a_event.getTransferable();
if (!t.isDataFlavorSupported(FLAVOR)) return null;
try { try {
return (TabTransferData) a_event.getTransferable().getTransferData(FLAVOR); return (TabTransferData) t.getTransferData(FLAVOR);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -137,8 +140,11 @@ public class DraggableTabbedPane extends JTabbedPane {
} }
private TabTransferData getTabTransferData(DropTargetDragEvent a_event) { private TabTransferData getTabTransferData(DropTargetDragEvent a_event) {
Transferable t = a_event.getTransferable();
if (!t.isDataFlavorSupported(FLAVOR)) return null;
try { try {
return (TabTransferData) a_event.getTransferable().getTransferData(FLAVOR); return (TabTransferData) t.getTransferData(FLAVOR);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -147,8 +153,11 @@ public class DraggableTabbedPane extends JTabbedPane {
} }
private TabTransferData getTabTransferData(DragSourceDragEvent a_event) { private TabTransferData getTabTransferData(DragSourceDragEvent a_event) {
Transferable t = a_event.getDragSourceContext().getTransferable();
if (!t.isDataFlavorSupported(FLAVOR)) return null;
try { try {
return (TabTransferData) a_event.getDragSourceContext().getTransferable().getTransferData(FLAVOR); return (TabTransferData) t.getTransferData(FLAVOR);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -266,6 +275,7 @@ public class DraggableTabbedPane extends JTabbedPane {
public void dragOver(final DropTargetDragEvent e) { public void dragOver(final DropTargetDragEvent e) {
TabTransferData data = getTabTransferData(e); TabTransferData data = getTabTransferData(e);
if (data == null) return;
if (getTabPlacement() == JTabbedPane.TOP if (getTabPlacement() == JTabbedPane.TOP
|| getTabPlacement() == JTabbedPane.BOTTOM) { || getTabPlacement() == JTabbedPane.BOTTOM) {
@ -309,6 +319,7 @@ public class DraggableTabbedPane extends JTabbedPane {
} // if } // if
TabTransferData data = getTabTransferData(e); TabTransferData data = getTabTransferData(e);
if (data == null) return false;
if (DraggableTabbedPane.this == data.getTabbedPane() if (DraggableTabbedPane.this == data.getTabbedPane()
&& data.getTabIndex() >= 0) { && data.getTabIndex() >= 0) {
@ -336,6 +347,7 @@ public class DraggableTabbedPane extends JTabbedPane {
} // if } // if
TabTransferData data = getTabTransferData(e); TabTransferData data = getTabTransferData(e);
if (data == null) return false;
if (DraggableTabbedPane.this == data.getTabbedPane() if (DraggableTabbedPane.this == data.getTabbedPane()
&& data.getTabIndex() >= 0) { && data.getTabIndex() >= 0) {
@ -403,6 +415,7 @@ public class DraggableTabbedPane extends JTabbedPane {
} }
private void convertTab(TabTransferData a_data, int a_targetIndex) { private void convertTab(TabTransferData a_data, int a_targetIndex) {
if (a_data == null) return;
DraggableTabbedPane source = a_data.getTabbedPane(); DraggableTabbedPane source = a_data.getTabbedPane();
int sourceIndex = a_data.getTabIndex(); int sourceIndex = a_data.getTabIndex();
if (sourceIndex < 0) { if (sourceIndex < 0) {
@ -459,6 +472,7 @@ public class DraggableTabbedPane extends JTabbedPane {
m_isDrawRect = false; m_isDrawRect = false;
return; return;
} // if } // if
if (a_data == null) return;
if ((a_data.getTabbedPane() == this) if ((a_data.getTabbedPane() == this)
&& (a_data.getTabIndex() == next && (a_data.getTabIndex() == next
@ -492,6 +506,7 @@ public class DraggableTabbedPane extends JTabbedPane {
m_isDrawRect = false; m_isDrawRect = false;
return; return;
} // if } // if
if (a_data == null) return;
if ((a_data.getTabbedPane() == this) if ((a_data.getTabbedPane() == this)
&& (a_data.getTabIndex() == next && (a_data.getTabIndex() == next