Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-980

Code completion throwing exception when completing on field of unknown type

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Sprint:
      4.1.0

      Description

      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)

        Attachments

          Activity

            People

            • Assignee:
              nccb Neil Brown
              Reporter:
              nccb Neil Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: