Menu

#4 appendSuper should not be called if super class is Object

commonclipse_1.1.0
open
5
2012-10-08
2005-05-13
No

Hi,

Thank you for commoneclipse first of all!

I found generated equals() and hashCode() calls
appendSuper( super.hashCode() ) (or super.equals())
even if the super class is java.lang.Object. The
generated code may not call appendSuper for
java.lang.Object because it will make the generated
methods broken.

Regards,
Trustin

Discussion

  • Nils Winkler

    Nils Winkler - 2006-01-11

    Logged In: YES
    user_id=519234

    +1

    This is a really annoying bug, please fix it!

    Thanks,

    Nils

     
  • Nobody/Anonymous

    Logged In: NO

    Hi,

    I just found the same problem, and I agree.

    Good job though, nice plugin (tested it and it works fine even with Eclipse 3.3 M6).

    Thanks,
    Dan

     
  • Nobody/Anonymous

    Logged In: NO

    It's only a bug if you don't double-check the generated code. It will generate .appendSuper() and you just need to cut that bit out. Problem solved.

    Would be nice if the tool didn't add it if the class in question doesn't extend anything, or if the class "extends Object" only.

     

Log in to post a comment.