diff --git a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar b/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar deleted file mode 100644 index 8aa8a372..00000000 Binary files a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar and /dev/null differ diff --git a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar.md5 b/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar.md5 deleted file mode 100644 index 470a111e..00000000 --- a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -41d368cd63ae76bba69ccb6e967866fe \ No newline at end of file diff --git a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar.sha1 b/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar.sha1 deleted file mode 100644 index f014ee80..00000000 --- a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -96f9c3d3bee336c4653abf42444c025b6dfd1836 \ No newline at end of file diff --git a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom b/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom deleted file mode 100644 index 0b80d015..00000000 --- a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom +++ /dev/null @@ -1,8 +0,0 @@ - - - 4.0.0 - com.github.weisj - darklaf-bcv - 2.6.2bcv - diff --git a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom.md5 b/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom.md5 deleted file mode 100644 index c4d5cfce..00000000 --- a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -74478ea2fe1166fa888c71a79567301d \ No newline at end of file diff --git a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom.sha1 b/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom.sha1 deleted file mode 100644 index 5bf61320..00000000 --- a/libs/com/github/weisj/darklaf-bcv/2.6.2bcv/darklaf-bcv-2.6.2bcv.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -d30064114889fe65ffd7c6c27f295351dec57586 \ No newline at end of file diff --git a/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml b/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml deleted file mode 100644 index dbd34aeb..00000000 --- a/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - com.github.weisj - darklaf-bcv - - 2.6.2bcv - - 2.6.2bcv - - 20210724002216 - - diff --git a/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml.md5 b/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml.md5 deleted file mode 100644 index 4c4b66d9..00000000 --- a/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -75dd4d459bc5baedf71904887dc0b60e \ No newline at end of file diff --git a/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml.sha1 b/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml.sha1 deleted file mode 100644 index 0a9234a0..00000000 --- a/libs/com/github/weisj/darklaf-bcv/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -cc64fe02e94fab19ada3c4e39a6d984d5bf541b1 \ No newline at end of file diff --git a/pom.xml b/pom.xml index ed335b9d..800eb668 100644 --- a/pom.xml +++ b/pom.xml @@ -17,10 +17,6 @@ local-maven-repo file:///${project.basedir}/libs - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - jitpack.io https://jitpack.io @@ -86,7 +82,7 @@ org.codehaus.janino commons-compiler - 3.1.4 + 3.1.6 org.apache.commons @@ -131,7 +127,7 @@ org.codehaus.janino janino - 3.1.4 + 3.1.6 com.jd @@ -225,8 +221,8 @@ com.github.weisj - darklaf-bcv - 2.6.2bcv + darklaf-core + 2.7.2 com.github.weisj diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/hexviewer/JHexEditor.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/hexviewer/JHexEditor.java index 8071b0f0..7ba77848 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/hexviewer/JHexEditor.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/hexviewer/JHexEditor.java @@ -1,5 +1,7 @@ package the.bytecode.club.bytecodeviewer.gui.hexviewer; +import java.awt.Graphics2D; +import java.awt.RenderingHints; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import java.awt.BorderLayout; @@ -160,8 +162,11 @@ public class JHexEditor extends JPanel implements FocusListener, AdjustmentListe fn.getHeight() + 1); } - protected void printString(Graphics g, String s, int x, int y) { + protected void printString(Graphics graphics, String s, int x, int y) { + Graphics2D g = (Graphics2D) graphics; FontMetrics fn = getFontMetrics(font); + g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); g.drawString(s, ((fn.stringWidth(" ") + 1) * x) + border, ((fn.getHeight() * (y + 1)) - fn.getMaxDescent()) + border); } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceTree.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceTree.java index e41eda07..e461824d 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceTree.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceTree.java @@ -43,17 +43,20 @@ public class ResourceTree extends JTree StringMetricsUtil m = null; @Override - public void paint(final Graphics g) + public void paint(final Graphics graphics) { try { + Graphics2D g = (Graphics2D) graphics; super.paint(g); if (m == null) { - m = new StringMetricsUtil((Graphics2D) g); + m = new StringMetricsUtil(g); } if (treeRoot.getChildCount() < 1) { + g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); g.setColor(new Color(0, 0, 0, 100)); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(Color.white); @@ -63,7 +66,7 @@ public class ResourceTree extends JTree getHeight() / 2); } } - catch (InternalError | NullPointerException ignored) + catch (InternalError | NullPointerException | ClassCastException ignored) { } } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceContainerImporter.java b/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceContainerImporter.java index 62062823..ae14a3dc 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceContainerImporter.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceContainerImporter.java @@ -73,16 +73,18 @@ public class ResourceContainerImporter try { //attempt to import using Java ZipInputStream - importZipInputStream(false); + return importZipInputStream(false); } - catch (IOException e) + catch (Throwable t) { - e.printStackTrace(); - - //fallback to apache commons ZipFile - importApacheZipFile(false); + try { + //fallback to apache commons ZipFile + return importApacheZipFile(false); + } catch (Throwable t1) { + t1.addSuppressed(t); + throw t1; + } } - return this; } /** @@ -93,10 +95,10 @@ public class ResourceContainerImporter { //TODO remove this .class check and just look for cafebabe if (name.endsWith(".class")) - addClassResource(name, stream); - else if(!classesOnly) - addResource(name, stream); - + return addClassResource(name, stream); + else if (!classesOnly) + return addResource(name, stream); + return this; } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/util/FileDrop.java b/src/main/java/the/bytecode/club/bytecodeviewer/util/FileDrop.java index e3cf56c6..2b74a904 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/util/FileDrop.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/util/FileDrop.java @@ -444,10 +444,10 @@ public class FileDrop { boolean support; try { final Class arbitraryDndClass = Class - .forName("DnDConstants"); + .forName("java.awt.dnd.DnDConstants"); support = true; } // end try - catch (final Exception e) { + catch (final Throwable t) { support = false; } // end catch supportsDnD = support;