diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionEngine.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionEngine.java index 32e4b504dec..1922f69f2de 100644 --- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionEngine.java +++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionEngine.java @@ -1234,25 +1234,28 @@ private void processMembers(ITypeBinding typeBinding, Bindings scope, } private static boolean findInSupers(ITypeBinding root, ITypeBinding toFind) { - String keyToFind = toFind.getErasure().getKey(); - Queue toCheck = new LinkedList<>(); - Set alreadyChecked = new HashSet<>(); - toCheck.add(root.getErasure()); - while (!toCheck.isEmpty()) { - ITypeBinding current = toCheck.poll(); - String currentKey = current.getErasure().getKey(); - if (alreadyChecked.contains(currentKey)) { - continue; - } - alreadyChecked.add(currentKey); - if (currentKey.equals(keyToFind)) { - return true; - } - for (ITypeBinding superInterface : current.getInterfaces()) { - toCheck.add(superInterface); - } - if (current.getSuperclass() != null) { - toCheck.add(current.getSuperclass()); + ITypeBinding superFind = toFind.getErasure(); + if( superFind != null ) { + String keyToFind = superFind.getKey(); + Queue toCheck = new LinkedList<>(); + Set alreadyChecked = new HashSet<>(); + toCheck.add(root.getErasure()); + while (!toCheck.isEmpty()) { + ITypeBinding current = toCheck.poll(); + String currentKey = current.getErasure().getKey(); + if (alreadyChecked.contains(currentKey)) { + continue; + } + alreadyChecked.add(currentKey); + if (currentKey.equals(keyToFind)) { + return true; + } + for (ITypeBinding superInterface : current.getInterfaces()) { + toCheck.add(superInterface); + } + if (current.getSuperclass() != null) { + toCheck.add(current.getSuperclass()); + } } } return false;