Community
Participate
Working Groups
Build Identifier: I20110613-1736 Assume the following code: public class FooBar { protected boolean isFoo() { return getBar() > 0; } protected int getBar() { return 1; } protected void assertTrue(boolean x) { // Nothing } protected void dummy() { assertTrue(isFoo()); } } When inlining #isFoo() I'd expect dummy() to look like this: protected void dummy() { assertTrue(getBar() > 0); } But one gets: protected void dummy() { assertTrue(getBar() > 0; } (note the missing ')', which leads to obvious compile errors). Reproducible: Always Steps to Reproduce: See summary 1. Inline a boolean method that is directly called to produce a parameter value for another method 2. Missing ')' in the inlined places.
Moving to JDT/UI for investigation.
1. download 3.7 SDK from: http://download.eclipse.org/eclipse/downloads/drops/R-3.7-201106131736/index.php 2. start new workspace 3. paste the code from comment 0 into Package Explorer 4. inline isFoo() ==> works fine - no compile errors.
I now retried this following the description from comment 2, and can also no longer reproduce it. As soon as I see it again, what would be information I should immediately provide about the state? And, should I reopen this bug, or file a new one and link them together?
(In reply to comment #3) > I now retried this following the description from comment 2, and can also no > longer reproduce it. > > As soon as I see it again, what would be information I should immediately > provide about the state? Check the .log for errors. Also, provide the JRE and the project compliance you're using. If possible attach the whole project. > And, should I reopen this bug, or file a new one and > link them together? Just reopen this one.