IndexOutOfBoundsException at SQLMergeClause.execute() #939

Closed
cowwoc opened this Issue Sep 19, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@cowwoc
Contributor

cowwoc commented Sep 19, 2014

Hi,

I just got the following exception:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at com.mysema.query.sql.dml.SQLMergeClause.getIds(SQLMergeClause.java:298)
    at com.mysema.query.sql.dml.SQLMergeClause.executeCompositeMerge(SQLMergeClause.java:303)
    at com.mysema.query.sql.dml.SQLMergeClause.execute(SQLMergeClause.java:267)

Looking at the source-code, it seems you expect me to invoke keys(). Please improve the error message, for all cases where the code invokes keys.get(0) (there are 3 locations by my count).

@timowest timowest added this to the 3.5.0 milestone Sep 20, 2014

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Sep 20, 2014

Member

I provided a pull request which uses the primary key columns as a fallback, if a primary key is defined and otherwise throws an exception.

Member

timowest commented Sep 20, 2014

I provided a pull request which uses the primary key columns as a fallback, if a primary key is defined and otherwise throws an exception.

@cowwoc

This comment has been minimized.

Show comment
Hide comment
@cowwoc

cowwoc Sep 20, 2014

Contributor

Looks good to me.

Contributor

cowwoc commented Sep 20, 2014

Looks good to me.

@timowest timowest closed this in #948 Sep 21, 2014

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Sep 30, 2014

Member

Released in 3.5.0

Member

timowest commented Sep 30, 2014

Released in 3.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment