Community
Participate
Working Groups
Example input: public void parse(BufferedReader in) throws IOException { String word; while (!emptyLine(word = in.readLine())) { System.out.println(word); } } private static boolean emptyLine(String s) { return s.isEmpty(); } Focus call to emptyLine() within parse() Choose Refactor > Inline Method Expected result: public void parse(BufferedReader in) { String word; while (!(word = in.readLine()).isEmpty()) { System.out.println(word); } } Actual result: public void parse(BufferedReader in) throws IOException { String word; String s = word = in.readLine(); while (!s.isEmpty()) { System.out.println(word); } } Just for clarity: Input and Expected will read and output each line, then return normally. Actual result will go into an infinite loop if there's any input. Admittedly, a 'for' loop is probably more appropriate here, but seeing that "Inline Method" can be used to replace ALL calls, this may introduce hard-to-find bugs as it changes the behaviour. This is *not* a duplicate of #24931 The description link for the "UI" and "text" components are broken (that is, still pointing to http://www.eclipse.org/jdt/ui/index.html but should be pointing to blah/index.php -- the extensions differ). Should I open another bug? Versions: Version: Luna Release (4.4.0) Build id: 20140612-0600 Eclipse IDE for Java Developers 4.4.0.20140612-0500 Eclipse Java Development Tools 3.10.0.v20140606-1536
Actually, only now I realize that it says "s = word = in.readLine();", thereby only declaring an unnecessary variable. So yes, this *does* reopen https://bugs.eclipse.org/bugs/show_bug.cgi?id=24931. As I can't re-open the old one, please let this stay open.
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. If you have further information on the current state of the bug, please add it. 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.
Still an issue using R4.9.