Hi Zilvinas, This is a known problem just because ++ and -- operations cannot be transformed into getters/sertters usage correctly. However it is not the big issue to correct this manually.
Best regards, Eugene Zhuravlev IntelliJ Software, http://www.intellij.com/ "Develop with pleasure!" ----- Original Message ----- From: "Eugene Belyaev" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 26 November, 2001 3:24 PM Subject: [Eap-list] FW: Encapsulate fields feature bug > I assume this was supposed to go to the list. > > -----Original Message----- > From: Zilvinas Kybartas [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 26, 2001 3:54 PM > To: mailto:eap-list > Subject: Encapsulate fields feature bug > > > Hello, > > I'm not sure is this the right place where I should submit a bug... > > I was using Encapsulate Fields refactoring feature and it seems that it > doesn't works wery well with the primitive types. > > Here is the source code before fields enacpsulation: > > public class Foo1 > { > public int a; > } > > public class Foo2 > { > public static void main(String[] args) > { > Foo1 foo1 = new Foo1(); > > int b = foo1.a++; > } > } > > > And here is how it looks after encapsulation > > public class Foo1 > { > private int a; > > public int getA() { > return a; > } > > public void setA(int a) { > this.a = a; > } > } > > public class Foo2 > { > public static void main(String[] args) > { > Foo1 foo1 = new Foo1(); > > > int b = foo1.setA(foo1.getA() + 1); > //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > //This is the error, because setA() method return type is void. > > > } > } > > > _______________________________________________ > 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
