| Summary: | [evaluations] force return fails with semi-colon and no "return" keyword | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | darin.eclipse |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
Without the semicolon works in 3.5RC4 With the semi-colon, it fails because the result is null (i.e. you need a "return XYZ;" for it to work. Inspect works in both cases (and results in null when there is a semi-colon). This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
While testing the force return feature, I started encountering odd errors while evaluating. An error would come up saying that there was an error evaluating, the text of the dialog is "1". I was using the ForceReturnTests class from the manual suite. It seems to occur whenever an evaluation is done on an inner class in this file. Here is one example. /** * Inner class for testing */ class D { private String fString; public D(String text) { fString = text; } public String toString() { return fString; } } /** * tests getting a <code>D</code> value * @return */ public D getObjectValue1() { D d = new D("orginal"); return d; //TODO force return } If you force return the variable d, everything works. However, force returning 'new D("original");' with or without the semicolon, fails. Inspect also failed. Tested in both WinVista and WinXp