This is fixed in the build #508. Thanks!

Best regards,
Valentin Kipiatkov
-----------------------------------------------------------
 IntelliJ Software, http://www.intellij.com/
 "Develop with pleasure"
-----------------------------------------------------------

----- Original Message ----- 
From: "Andreas Gerold" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 14, 2001 11:43 PM
Subject: [Eap-list] Inline method bugs


> 
> I have discovered a couple of unwanted effects when using 
> Inline method refractoring.
> 
> When inlining the method toInline below:
> 
> public void doSutff()
> {
>     toInline("foo");
> }
> 
> public void toInline(String theValue)
> {
>     theValue = theValue + "bar";
>     System.out.println(theValue);
> }
> 
> result:
> 
> public void doSutff()
> {
>     "foo" = "foo" + "bar";
>     System.out.println("foo");
> }
> 
> which is not what you want!
> 
> same thing happens if the parameter is for example int. (5 = 5 + 3;)
> 
> Another problem I have encountered is:
> consider the following code:
> 
> public void doSutff()
> {
>     String s = "foo";
>     toInline(s);
>     System.out.println("s = " + s);
> }
> 
> public void toInline(String s)
> {
>     s = s + "bar";
>     System.out.println("s = " + s);
> }
> 
> the result is:
> s = foobar
> s = foo
> 
> But when the toInline is inlined the code looks like:
> public void doSutff()
> {
>     String s = "foo";
>     s = s + "bar";
>     System.out.println("s = " + s);
>     System.out.println("s = " + s);
> }
> 
> And the output is:
> s = foobar
> s = foobar
> 
> 
> // Andreas Gerold
> 
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list


_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to