[hibernate-dev] GenericConstraintDef extends raw ConstraintDef

Dag Hovland hovlanddag at gmail.com
Sun Oct 10 05:55:59 EDT 2010


Hi!

We were wondering why

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>.

Regards,

Dag Hovland and Federico Mancini




More information about the hibernate-dev mailing list