Closed foal closed 6 years ago
Hi foal,
can you check the new version. There is a setting called "for primitives don't use Objects method to avoid casting" https://guavaeclipseplugin.github.io/images/GuavaEclipsePlugin_Preferences_EqualsHashCode.png
i will add some documentation about this setting
can you check if this behavior fits your needs? If yes, please let me know if not let us talk about an example.
I think i get your point
you want an option to enable explicite AutoBoxing.
Yes, I see it as following options: ( ) generate it as it ( ) add @SuppressWarnings("boxing") annotation ( ) use the explicit boxing
I check the current version - it solves the issue for equals method, but we still have autoboxing in a hash.
hi foal,
can you test current snapshot, please. update site is here: https://dl.bintray.com/guavaeclipseplugin/GuavaEclipsePlugin/SNAPSHOT/latest/
Window -> Preferences -> Guava Preferences -> Equals/HashCode Methods Preferences there is a new RadioGroup "autoboxing, supressWarning(boxing), explicit boxing for primitives"
One thing to know for equals methods: the selection of the new radio group has no effect so long the checkbox "For primitives don't use Objects method in equals() to avoid casting" is selected.
e.g generated
hashCode
nowhave to be
the same for
equals