| Summary: | inline method: arguments need to be parentized [refactoring] | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> |
| Component: | UI | Assignee: | Dirk Baeumer <dirk_baeumer> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P2 | CC: | ribs |
| Version: | 3.0 | ||
| Target Milestone: | 3.2 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The method body also needs to be parenthesized. The refactoring didn't work for
me on this example:
if (!isString(s)) ...
boolean isString(Object o) {
return o instanceof String;
}
I got
if (!s instanceof String) ...
which is even a type error.
Fixed for RC1. The problematic thing with this bug was that it introduced a semantic shift hard to spot. Setting to fixed *** Bug 135115 has been marked as a duplicate of this bug. *** verified for 20060426 |
20031008 protected long fValue1= getValue(1 + 3); private long getValue(int i) { return System.currentTimeMillis() * i; } results in: protected long fValue1= System.currentTimeMillis() * 1 + 3;