Project: JDT
Bug 288060 [quick fix]: Ctrl-2 + L to trigger quick fix causes NPE if the method returns an array (Mobile projects only)
Reported: 2009-08-30 16:05:35 | Status: verified fixed

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729) Build Identifier: Pulsar for Mobile Java Developers. Build id: 20090619-0625 The Quick-Fix obtained by Ctrl-1 or Ctrl-2, L (and as well for class fields) foes not work if the resulting field/variable would be an array type. This is caused by a NPE for which the stacktrace is attached. Reproducible: Always Steps to Reproduce: 1. Create a new empty MTJ project 2. Add a class with the following methods: public class TestClass { public int[] test() { return null; } public void test2() { this.test(); } } 3. Set the cursor to "this.test();" and press Ctrl-2 and then L 4. Nothing happens, but a stacktrace will appear in the .log file of the workspace. However this shortcut works fine for the same class if contained in a normal JavaSE project. I did retest this with the 3.5. RC1 build of eclipse and the bug is still there.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java