Yes, I've reported this several times already.
It's really annoying. On the other hand, I tend
to use this refactoring in waves and by far not
daily, so it's not that critical. Maybe that's
also why IntelliJ hasn't fixed it yet.
-Thomas

> -----Original Message-----
> From: North D [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 24, 2001 2:51 AM
> To: EAP List (E-mail)
> Subject: [Eap-list] Move Inner to Upper bug
> 
> 
> Hi list.
> 
> There's a bug in the Move Inner to Upper refactoring where an 
> inner class
> refers to itself:
> 
> The Enum class here:
> 
> public class OuterClass {
>     /** Typesafe enumeration */
>     public static final class Enum {
>         private int id;
>         private Enum( int id ) { this.id = id; }
>         public static final Enum ONE = new Enum( 1 );
>         public static final Enum TWO = new Enum( 2 );
>     }
> }
> 
> becomes the following, with incorrect references to OuterClass.Enum:
> 
> /** Typesafe enumeration */
> public final class Enum {
>     private int id;
>     private Enum( int id ) { this.id = id; }
>     public static final OuterClass.Enum ONE = new 
> OuterClass.Enum( 1 );
>     public static final OuterClass.Enum TWO = new 
> OuterClass.Enum( 2 );
> }
> 
> Cheers,
> Dan
> 
> 
> **************************************************************
> *************************
> This email and any files transmitted with it are confidential 
> and intended 
> solely for the use of the individual or entity to whom they 
> are addressed. 
> If you have received this email in error please notify 
> [EMAIL PROTECTED] immediately.
> 
> This footnote also confirms that this email message has been 
> swept for the 
> presence of computer viruses.
> **************************************************************
> *************************
> 
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list
> 


************************************
If this email is not intended for you, or you are not responsible for
the delivery of this message to the addressee, please note that this
message may contain ITT Privileged/Proprietary Information.  In such
a case, you may not copy or deliver this message to anyone.  You should
destroy this message and kindly notify the sender by reply email.
Information contained in this message that does not relate to the
business of ITT is neither endorsed by nor attributable to ITT.
************************************


  

--- Begin Message ---
This bug is still present in build 515.

It not only affects static variables, 
but also references to the inner class
itself, like so:

BEFORE:
class Outer {
  class Inner {

    protected static final String SEPARATOR = ".";

    public void doStuff() {
      String s = "A" + SEPARATOR + "B";
    }

    public boolean equals(Object object) {
      Inner otherInner = (Inner)object;
      //...
    }

  }
}

AFTER:
class Outer {
}

class Inner {

  private static final String SEPARATOR = ".";

  public void doStuff() {
    String s = "A" + Outer.Inner.SEPARATOR + "B";
  }

  public boolean equals(Object object) {
    Outer.Inner otherInner = (Outer.Inner)object;
    //...
  }

}

The "Outer.Inner." and "Outer." have been incorrectly added.

Regards.
-Thomas

> -----Original Message-----
> From: Valentin Kipiatkov [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 26, 2001 1:47 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Eap-list] Bug in "Move Inner to Upper Level" Refactoring
> 
> 
> This is fixed already in the builds #508 and #509. Please, 
> switch to the
> latest build.
> 
> Best regards,
> Valentin Kipiatkov
> -----------------------------------------------------------
>  IntelliJ Software, http://www.intellij.com/
>  "Develop with pleasure"
> -----------------------------------------------------------
> 
> ----- Original Message -----
> From: "Vollmer, Thomas - CannonSA" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, October 26, 2001 5:12 AM
> Subject: [Eap-list] Bug in "Move Inner to Upper Level" Refactoring
> 
> 
> > BEFORE:
> > class Outer {
> >   class Inner {
> >     protected static final String SEPARATOR = ".";
> >     public void doStuff() {
> >       String s = "A" + SEPARATOR + "B";
> >     }
> >   }
> > }
> >
> > AFTER:
> > class Outer {
> > }
> >
> > class Inner {
> >   private static final String SEPARATOR = ".";
> >   public void doStuff() {
> >     String s = "A" + Outer.Inner.SEPARATOR + "B";
> >   }
> > }
> >
> > Notice the incorrect prefix "Outer.Inner." when referring to
> > the static variable SEPARATOR in method Inner.doStuff().
> > This prefix is automagically added when doing the refactoring.
> > Build 507.
> >
> > -Thomas


************************************
If this email is not intended for you, or you are not responsible for
the delivery of this message to the addressee, please note that this
message may contain ITT Privileged/Proprietary Information.  In such
a case, you may not copy or deliver this message to anyone.  You should
destroy this message and kindly notify the sender by reply email.
Information contained in this message that does not relate to the
business of ITT is neither endorsed by nor attributable to ITT.
************************************



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

Reply via email to