提交 9614929f 编写于 作者: U unknown

Fixes build issues

上级 cc2ae80e
...@@ -5,6 +5,7 @@ import javax.swing.*; ...@@ -5,6 +5,7 @@ import javax.swing.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import jadx.core.utils.exceptions.JadxException;
import jadx.gui.settings.JadxSettings; import jadx.gui.settings.JadxSettings;
import jadx.gui.settings.JadxSettingsAdapter; import jadx.gui.settings.JadxSettingsAdapter;
import jadx.gui.ui.MainWindow; import jadx.gui.ui.MainWindow;
...@@ -24,8 +25,13 @@ public class JadxGUI { ...@@ -24,8 +25,13 @@ public class JadxGUI {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
public void run() { public void run() {
MainWindow window = new MainWindow(jadxArgs); try {
window.open(); MainWindow window = new MainWindow(jadxArgs);
window.open();
}
catch(JadxException e) {
throw new RuntimeException(e);
}
} }
}); });
} catch (Throwable e) { } catch (Throwable e) {
......
...@@ -22,7 +22,7 @@ public class JadxWrapper { ...@@ -22,7 +22,7 @@ public class JadxWrapper {
private final JadxDecompiler decompiler; private final JadxDecompiler decompiler;
private File openFile; private File openFile;
public JadxWrapper(IJadxArgs jadxArgs) { public JadxWrapper(IJadxArgs jadxArgs) throws JadxException {
this.decompiler = new JadxDecompiler(jadxArgs); this.decompiler = new JadxDecompiler(jadxArgs);
} }
...@@ -53,7 +53,7 @@ public class JadxWrapper { ...@@ -53,7 +53,7 @@ public class JadxWrapper {
} }
progressMonitor.close(); progressMonitor.close();
LOG.info("done"); LOG.info("done");
} catch (InterruptedException e) { } catch (InterruptedException|JadxException e) {
LOG.error("Save interrupted", e); LOG.error("Save interrupted", e);
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }
......
...@@ -32,6 +32,7 @@ import org.slf4j.Logger; ...@@ -32,6 +32,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import jadx.api.ResourceFile; import jadx.api.ResourceFile;
import jadx.core.utils.exceptions.JadxException;
import jadx.gui.JadxWrapper; import jadx.gui.JadxWrapper;
import jadx.gui.jobs.BackgroundWorker; import jadx.gui.jobs.BackgroundWorker;
import jadx.gui.jobs.DecompileJob; import jadx.gui.jobs.DecompileJob;
...@@ -100,7 +101,7 @@ public class MainWindow extends JFrame { ...@@ -100,7 +101,7 @@ public class MainWindow extends JFrame {
private transient ProgressPanel progressPane; private transient ProgressPanel progressPane;
private transient BackgroundWorker backgroundWorker; private transient BackgroundWorker backgroundWorker;
public MainWindow(JadxSettings settings) { public MainWindow(JadxSettings settings) throws JadxException {
this.wrapper = new JadxWrapper(settings); this.wrapper = new JadxWrapper(settings);
this.settings = settings; this.settings = settings;
this.cacheObject = new CacheObject(); this.cacheObject = new CacheObject();
......
...@@ -12,6 +12,7 @@ import jadx.api.JadxDecompiler; ...@@ -12,6 +12,7 @@ import jadx.api.JadxDecompiler;
import jadx.api.JavaClass; import jadx.api.JavaClass;
import jadx.api.JavaPackage; import jadx.api.JavaPackage;
import jadx.core.dex.nodes.ClassNode; import jadx.core.dex.nodes.ClassNode;
import jadx.core.utils.exceptions.JadxException;
import jadx.gui.JadxWrapper; import jadx.gui.JadxWrapper;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
...@@ -24,7 +25,7 @@ public class JSourcesTest { ...@@ -24,7 +25,7 @@ public class JSourcesTest {
private JadxDecompiler decompiler; private JadxDecompiler decompiler;
@Before @Before
public void init() { public void init() throws JadxException {
JRoot root = mock(JRoot.class); JRoot root = mock(JRoot.class);
when(root.isFlatPackages()).thenReturn(false); when(root.isFlatPackages()).thenReturn(false);
JadxWrapper wrapper = mock(JadxWrapper.class); JadxWrapper wrapper = mock(JadxWrapper.class);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册