Fix build with JDK 9+
This commit is contained in:
parent
5581a343f5
commit
913b49c593
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
<version>2.10.12</version>
|
||||
|
||||
<properties>
|
||||
<java.version>8</java.version>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
@ -256,7 +256,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.1.1</version> <!-- 3.1.2 breaks build on JDK 9+ -->
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
|
|
|
@ -3,6 +3,7 @@ package the.bytecode.club.bytecodeviewer.gui.resourcelist;
|
|||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.MutableTreeNode;
|
||||
import java.util.Comparator;
|
||||
import javax.swing.tree.TreeNode;
|
||||
|
||||
/**
|
||||
* @author Konloch
|
||||
|
@ -33,19 +34,19 @@ public class ResourceTreeNode extends DefaultMutableTreeNode
|
|||
private void recursiveSort(final ResourceTreeNode node)
|
||||
{
|
||||
node.children.sort(nodeComparator);
|
||||
for (ResourceTreeNode nextNode : (Iterable<ResourceTreeNode>) node.children)
|
||||
for (TreeNode nextNode : (Iterable<TreeNode>) node.children)
|
||||
{
|
||||
if (nextNode.getChildCount() > 0)
|
||||
{
|
||||
recursiveSort(nextNode);
|
||||
recursiveSort((ResourceTreeNode) nextNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected Comparator<ResourceTreeNode> nodeComparator = new Comparator<ResourceTreeNode>()
|
||||
protected Comparator<TreeNode> nodeComparator = new Comparator<TreeNode>()
|
||||
{
|
||||
@Override
|
||||
public int compare(final ResourceTreeNode o1, final ResourceTreeNode o2)
|
||||
public int compare(final TreeNode o1, final TreeNode o2)
|
||||
{
|
||||
// To make sure nodes with children are always on top
|
||||
final int firstOffset = o1.getChildCount() > 0 ? -1000 : 0;
|
||||
|
|
|
@ -82,10 +82,10 @@ public class SearchKeyAdapter extends KeyAdapter
|
|||
else
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
Enumeration<ResourceTreeNode> enums = curNode.depthFirstEnumeration();
|
||||
Enumeration<TreeNode> enums = curNode.depthFirstEnumeration();
|
||||
while (enums != null && enums.hasMoreElements())
|
||||
{
|
||||
ResourceTreeNode node = enums.nextElement();
|
||||
ResourceTreeNode node = (ResourceTreeNode) enums.nextElement();
|
||||
if (node.isLeaf())
|
||||
{
|
||||
if (((String) (node.getUserObject())).toLowerCase().contains(path[path.length - 1].toLowerCase()))
|
||||
|
|
Loading…
Reference in New Issue
Block a user