javaee / jaxb2-commons

JAXB Implementation project has been contributed to Eclipse Foundation. This repository is for legacy review only. Please refer to the Eclipse EE4J Metro project for the very latest
https://eclipse-ee4j.github.io/jaxb-ri/
Other
17 stars 15 forks source link

Add @Overrride to equas(Object), hashCode(), toString() #24

Closed glassfishrobot closed 14 years ago

glassfishrobot commented 14 years ago

I hardly understand why JAXB2 Basics Plugins, namely, Equals, HashCode and ToString do not add @Override annotation to generated methods (equals(Object), hasCode(), toString())). It would reduce the number of compilation warnings on generated classes - and on the other side should be extremely easy to implement.

Environment

Operating System: All Platform: All

Affected Versions

[current]

glassfishrobot commented 14 years ago

Reported by alesinskyy

glassfishrobot commented 14 years ago

alesinskyy said: For version 0.5.2 it was enough to add call to JMethod.annotate like below: protected JMethod generateObject$Equals(final ClassOutline classOutline, final JDefinedClass theClass) { final JMethod objectEquals = theClass.method(JMod.PUBLIC, theClass .owner().BOOLEAN, "equals"); { objectEquals.annotate(Override.class);

glassfishrobot commented 14 years ago

lexi said: Continued as: http://jira.highsource.org/browse/JIIB-33

glassfishrobot commented 14 years ago

Was assigned to lexi

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAXB2_COMMONS-24

glassfishrobot commented 14 years ago

Marked as won't fix on Wednesday, August 4th 2010, 6:07:35 am