diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/actions/GoToAction.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/actions/GoToAction.java index ae2fa1b74..23b5409e6 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/actions/GoToAction.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/actions/GoToAction.java @@ -211,7 +211,9 @@ else if (method) if (packagePath.startsWith("java") || packagePath.startsWith("javax") || packagePath.startsWith("com.sun")) return null; - String resourceName = packagePath + "/" + classMethodLocation.owner; + String resourceName = classMethodLocation.owner; + if (!packagePath.isEmpty()) + resourceName = packagePath + "/" + classMethodLocation.owner; if (resourceContainer.resourceClasses.containsKey(resourceName)) { @@ -229,7 +231,11 @@ else if (method) if (packagePath.startsWith("java") || packagePath.startsWith("javax") || packagePath.startsWith("com.sun")) return null; - String resourceName = packagePath + "/" + lexeme; + String resourceName = lexeme; + if (!packagePath.isEmpty()) + { + resourceName = packagePath + "/" + lexeme; + } if (resourceContainer.resourceClasses.containsKey(resourceName)) {