[BLUEJ-288] Auto-complete exception
I got this one in Greenfoot, but it should apply to BlueJ too. Go into the constructor of a World, and add this line:
{noformat} addObject(new Runnable() {}, 350, 50); {noformat}
Position your cursor between Runnable and the empty parentheses and hit Ctrl-Space. I got this exception:
{noformat} Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:131) at java.util.AbstractList.add(AbstractList.java:91) at bluej.parser.TextParser.endArgument(TextParser.java:1137) at bluej.parser.JavaParser.parseArgumentList(JavaParser.java:3017) at bluej.parser.JavaParser.parseExpression(JavaParser.java:2569) at bluej.parser.nodes.ExpressionNode.suggestAsExpression(ExpressionNode.java:76) at bluej.parser.nodes.ExpressionNode.getExpressionType(ExpressionNode.java:64) at bluej.parser.nodes.JavaParentNode.getExpressionType(JavaParentNode.java:228) at bluej.parser.nodes.JavaParentNode.getExpressionType(JavaParentNode.java:228) at bluej.parser.nodes.MethodNode.getExpressionType(MethodNode.java:254) at bluej.parser.nodes.JavaParentNode.getExpressionType(JavaParentNode.java:228) at bluej.parser.nodes.ParsedTypeNode.getExpressionType(ParsedTypeNode.java:335) at bluej.parser.nodes.JavaParentNode.getExpressionType(JavaParentNode.java:228) at bluej.parser.nodes.ParsedNode.getExpressionType(ParsedNode.java:405) at bluej.editor.moe.MoeEditor.createContentAssist(MoeEditor.java:3404) at bluej.editor.moe.MoeActions$ContentAssistAction.actionPerformed(MoeActions.java:1045) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1633) {noformat}
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 3.0.3