org.hibernate.validator.cfg.defs.GenericConstraintDef should (probably) not extend the raw
type ConstraintDef
-------------------------------------------------------------------------------------------------------------
Key: HV-387
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-387
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Reporter: Dag Hovland
Assignee: Hardy Ferentschik
Priority: Trivial
Attachments: ConstraintDef.diff, GenericConstraintDef.diff
The class
org.hibernate.validator.cfg.defs.GenericConstraintDef
extends the raw type ConstraintDef. Using maven, it compiles, but in Eclipse (with
jdk-1.6) We get
the following error:
"Name clash: The method groups(Class<?>...) of type GenericConstraintDef has
the same erasure as
groups(Class...) of type ConstraintDef but does not override it"
and similar for the method "payload". The others methods give no errors. We do
not understand why,
but it compiles after changing the definition to
public class GenericConstraintDef<A extends Annotation>
extends ConstraintDef<A>
and also replacing the "Class<?>" in the argument to the method
"constraintType" with "Class<A>.
The fix seems more "correct", and I suggest this is changed in the source.
The file GenericConstraintDef.diff contains the mentioned fix, while ConstraintDef.diff
adds type parameters to a few related methods in
org.hibernate.validator.cfg.ConstraintDef
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira