[hibernate-dev] ArrayIndexOutOfBoundsException in ReflectionHelper.parametersResolveToSameTypes

Gunnar Morling gunnar at hibernate.org
Wed Dec 11 06:19:45 EST 2013


Hi Ales,

Agreed, that doesn't look right. At this location the array should always
have one or two elements, I can't say right now what could cause the array
to be empty there.

I just put your Email class into a test project of mine but couldn't
reproduce the error (maybe something is special about AbstractEntity?). Any
chance you could provide an isolated test demonstrating the issue?

Thanks,

--Gunnar






2013/12/11 Ales Justin <ales.justin at gmail.com>

> resolvedSubType = {com.fasterxml.classmate.types.ResolvedObjectType at 11177
> }"com.moody.lw.server.domain.Email"
> memberResolver = {com.fasterxml.classmate.MemberResolver at 11583}
> typeWithMembers = {com.fasterxml.classmate.ResolvedTypeWithMembers at 11584}
> resolvedMethods = {com.fasterxml.classmate.members.ResolvedMethod[0]@11585}
> resolvedMethods.length = 0
>
> Where "Email" looks like:
>
> @Entity
> @Table(name = "emails")
> public class Email extends AbstractEntity {
>
>     private Long userId;
>     private String email;
>     private Boolean main;
>
>     public Email() {}
>
>     public Email(Long userId, String email, Boolean main) {
>         this.userId = userId;
>         this.email = email;
>         this.main = main;
>     }
>
>     @NotNull
>     public Long getUserId() {
>         return userId;
>     }
>
>     public void setUserId(Long userId) {
>         this.userId = userId;
>     }
>
>     @NotNull
>     public String getEmail() {
>         return email;
>     }
>
>     public void setEmail(String email) {
>         this.email = email;
>     }
>
>     public Boolean isMain() {
>         return main;
>     }
>
>     public void setMain(Boolean main) {
>         this.main = main;
>     }
>
>     @Override
>     public boolean equals(Object o) {
>         if (this == o) return true;
>         if (o == null || getClass() != o.getClass()) return false;
>         if (!super.equals(o)) return false;
>
>         Email email1 = (Email) o;
>
>         if (email != null ? !email.equals(email1.email) : email1.email !=
> null) return false;
>
>         return true;
>     }
>
>     @Override
>     public int hashCode() {
>         int result = super.hashCode();
>         result = 31 * result + (email != null ? email.hashCode() : 0);
>         return result;
>     }
> }
>
>
> On 11 Dec 2013, at 11:23, Ales Justin <ales.justin at gmail.com> wrote:
>
> > @Hardy, Emmanuel: https://gist.github.com/alesj/7908062
> >
> > Imo, any AIOOBE is a bug.
> >
> > -Ales
> >
>
> _______________________________________________
> 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