[hibernate-dev] ArrayIndexOutOfBoundsException in ReflectionHelper.parametersResolveToSameTypes
Hardy Ferentschik
hardy at hibernate.org
Thu Dec 12 05:50:23 EST 2013
Hi Ales,
could you try running against Hibernate Validator 5.0.2-SNAPSHOT.
I just deployed it and it would be interesting to see whether it fixes the problem prior to creating a final release.
—Hardy
On 12 Jan 2013, at 11:26, Ales Justin <ales.justin at gmail.com> wrote:
>> Can you confirm that some static method is involved here (which was the case for HV-818)? I can't see one on your Email class but maybe there is one on AbstractEntity?
>
> AbstractEntity -- static method at the bottom:
>
> (but Email is not the only one that extends AbstractEntity,
> where my issues went away when I removed any BV annotations,
> but might be that no other entity uses BV stuff)
>
> @MappedSuperclass
> public abstract class AbstractEntity implements Serializable {
> private static long serialVersionUID = 3l;
> private Long id;
>
> public AbstractEntity() {
> }
>
> @Id
> @GeneratedValue(strategy = GenerationType.IDENTITY)
> public Long getId() {
> return id;
> }
>
> public void setId(Long id) {
> this.id = id;
> }
>
> @Transient
> public String getInfo() {
> return getClass().getSimpleName() + "#" + getId();
> }
>
> @Override
> public boolean equals(Object obj) {
> if (obj == null)
> return false;
> if (getClass().equals(obj.getClass()) == false)
> return false;
>
> AbstractEntity other = (AbstractEntity) obj;
> return safeGet(id) == safeGet(other.getId());
> }
>
> public String toString() {
> return getInfo();
> }
>
> @Override
> public int hashCode() {
> return new Long(safeGet(id)).intValue();
> }
>
> protected static long safeGet(Long x) {
> return x == null ? 0 : x;
> }
> }
>
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list