Skip to content

Commit f45e58f

Browse files
committed
JDK Fix
1 parent 1a9c4c9 commit f45e58f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/contextmenu/impl

src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/contextmenu/impl/New.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import javax.swing.*;
1414
import javax.swing.tree.DefaultMutableTreeNode;
1515
import javax.swing.tree.MutableTreeNode;
16+
import javax.swing.tree.TreeNode;
1617
import javax.swing.tree.TreePath;
1718
import java.util.Enumeration;
1819

@@ -143,7 +144,7 @@ public static String buildPath(int startsAt, int max, DefaultMutableTreeNode tre
143144
//TODO this needs to be rewritten to support creating parent nodes that don't exist
144145
public static boolean searchAndInsert(String path, DefaultMutableTreeNode treeNode, String separator)
145146
{
146-
Enumeration<DefaultMutableTreeNode> children = treeNode.children();
147+
Enumeration<TreeNode> children = treeNode.children();
147148

148149
String findPath = FilenameUtils.getPath(path);
149150
String currentPath = buildPath(0, treeNode.getPath().length, treeNode, separator);
@@ -158,7 +159,7 @@ public static boolean searchAndInsert(String path, DefaultMutableTreeNode treeNo
158159

159160
while(children.hasMoreElements())
160161
{
161-
DefaultMutableTreeNode child = children.nextElement();
162+
DefaultMutableTreeNode child = (DefaultMutableTreeNode) children.nextElement();
162163
if(searchAndInsert(path, child, separator))
163164
return true;
164165
}

0 commit comments

Comments
 (0)