From 983479887bbfdd668278199781cb4ab930861eac Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Fri, 16 Aug 2024 13:14:34 +0800 Subject: [PATCH] Fix NPE when hovering at the keyword 'void' --- .../org/eclipse/jdt/internal/codeassist/DOMCodeSelector.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCodeSelector.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCodeSelector.java index 1c9e17449bb..c527f5f30d4 100644 --- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCodeSelector.java +++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCodeSelector.java @@ -605,6 +605,9 @@ private static boolean matchSignatures(IMethodBinding invocation, IMethodBinding } private IJavaElement[] findTypeInIndex(String packageName, String simpleName) throws JavaModelException { + if (simpleName == null) { + return new IJavaElement[0]; + } List indexMatch = new ArrayList<>(); TypeNameMatchRequestor requestor = new TypeNameMatchRequestor() { @Override