Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316913

Summary: JAXB: Set method w/o input parameter causes array index out of bounds
Product: z_Archived Reporter: David McCann <david.mccann>
Component: EclipselinkAssignee: David McCann <david.mccann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Contains fix + test case mods for 2.0 stream
none
Contains fix + test case mods for 2.2 stream
none
Contains fix + test case mods for 2.1 stream none

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