DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Andy Jefferson
Reporter: Christian S
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
DataNucleus API JDO

IndexArrayOutOfBoundException in JDOAnnotationReader

Created: 24/Apr/11 03:12 PM   Updated: 14/Jun/11 12:27 PM   Resolved: 24/Apr/11 05:10 PM
Component/s: None
Affects Version/s: 3.0.0.m2, 3.0.0.m3
Fix Version/s: 3.0.0.m4

File Attachments: 1. File jdo.api-patch.diff (1 kB)

 Description  « Hide
In JDOAnnotationReader line 322 there is an ArrayIndexOutOfBoundsException when parsing the @Joins Annotation. The wrong index variable for the loop traversal is used. instead of using "i" it should be "j". The @Joins Annotation won't work correctly or not at all, depending on the number of overall Annotations. (The bug is triggered, if there are more annotations than @Join Annotations in the value of @Joins and it depends on the order of the annotations.)

Sort Order: Ascending order - Click to sort in descending order
Christian S added a comment - 24/Apr/11 03:13 PM - edited
attached patch with correct index variables

Christian S added a comment - 24/Apr/11 03:15 PM
to clarify: the bug that the @Joins annotation is parsed wrong is always present. I meant that only the exception is triggered like described.

Andy Jefferson added a comment - 24/Apr/11 05:10 PM
Thx. Fixed in SVN trunk and in SVN branches/2.2 for core