Project: JDT
Bug 137925 Quick assist on undefined method in assert statement creates wrong result type
Reported: 2006-04-21 07:46:08 | Status: resolved fixed

Assume that I write the following line within some Java (>=1.4) method: assert checkFoo() : "foo fails" ; Assume also that method 'checkFoo()' has not yet been defined. I now use Quick Assist (CTRL+1) on "checkFoo()" to create the method. This results in the following construct: private Object checkFoo() { // ... some code template expanded here ... } The problem is, that the result type is 'Object', but should be 'boolean', because the assert statement demands this.

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