[BLUEJ-980] Code completion throwing exception when completing on field of unknown type
Create a field with an unknown type (e.g. an unimported class), e.g. Canvas canvas where you haven't imported Canvas. Then type "canvas.set" and press ctrl-space. Exception appears in log:
Exception in thread "JavaFX Application Thread" java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1439) at java.util.HashMap$KeyIterator.next(HashMap.java:1461) at bluej.parser.entity.ParsedReflective.getDeclaredFields(ParsedReflective.java:247) at bluej.parser.ParseUtils.getCompletionsForTarget(ParseUtils.java:178) at bluej.parser.ParseUtils.getPossibleCompletions(ParseUtils.java:93) at bluej.editor.moe.MoeEditor.createContentAssist(MoeEditor.java:3105)
And no code completion is shown (should show the window with no completions available)
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 4.1.0