Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316913 - JAXB: Set method w/o input parameter causes array index out of bounds
Summary: JAXB: Set method w/o input parameter causes array index out of bounds
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David McCann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-15 10:33 EDT by David McCann CLA
Modified: 2022-06-09 10:08 EDT (History)
0 users

See Also:


Attachments
Contains fix + test case mods for 2.0 stream (1.73 KB, patch)
2010-06-15 11:35 EDT, David McCann CLA
no flags Details | Diff
Contains fix + test case mods for 2.2 stream (1.73 KB, patch)
2010-06-15 11:36 EDT, David McCann CLA
no flags Details | Diff
Contains fix + test case mods for 2.1 stream (1.73 KB, patch)
2010-06-15 11:43 EDT, David McCann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David McCann CLA 2010-06-15 10:33:42 EDT
When the AnnotationsProcessor encounters a set method (when there is no get method) that has no input parameters we get an array index out of bounds error on the following line:

  ptype = setMethod.getParameterTypes()[0];

We should be checking that the Set method in question has exactly one input parameter, and if not, ignore the method.
Comment 1 David McCann CLA 2010-06-15 10:34:48 EDT
This fix is required in the following streams:

  2.0
  2.1
  2.2
Comment 2 David McCann CLA 2010-06-15 11:35:53 EDT
Created attachment 171952 [details]
Contains fix + test case mods for 2.0 stream
Comment 3 David McCann CLA 2010-06-15 11:36:08 EDT
Created attachment 171953 [details]
Contains fix + test case mods for 2.2 stream
Comment 4 David McCann CLA 2010-06-15 11:43:39 EDT
Created attachment 171955 [details]
Contains fix + test case mods for 2.1 stream
Comment 5 David McCann CLA 2010-06-15 12:57:20 EDT
Fix checked into the 2.0 stream.

Reviewed by:  matt.macivor@oracle.com
Tests:  all unit tests pass as expected; jaxb/xmlelement/EmployeeNamespaceTestCases
Comment 6 David McCann CLA 2010-06-15 13:02:21 EDT
Fix checked into the 2.2 stream.

Reviewed by:  matt.macivor@oracle.com
Tests:  all unit tests pass as expected;
jaxb/xmlelement/EmployeeNamespaceTestCases
Comment 7 David McCann CLA 2010-06-23 14:21:47 EDT
Fix checked into the 2.1 stream.

Reviewed by: matt.macivor@oracle.com, blaise.doughan@oracle.com 
Tests: all unit tests pass as expected; jaxb/xmlelement/XmlElementTestCases; oxm/mappings/directtofield/identifiedbyname/xmlattribute/DirectToXMLAttributeIdentifiedByNameSpecialCharactersTestCases; oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameSpecialCharactersTestCases
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:08:42 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink