Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317963 - JAXB Externalized Metadata: GetMethod should be checked for zero input arguments, and non-void return type
Summary: JAXB Externalized Metadata: GetMethod should be checked for zero input argume...
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: 354646
  Show dependency tree
 
Reported: 2010-06-25 08:52 EDT by David McCann CLA
Modified: 2022-06-09 10:05 EDT (History)
0 users

See Also:


Attachments
Contains proposed fix + supporting test case (3.19 KB, patch)
2010-10-05 12:00 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-25 08:52:15 EDT
When we process get method in getPropertyPropertiesForClass in AnnotationsProcessor, we should only process ones that have exactly one input parameter, and a non-void return type.

More than likely the change will be required to the following line of code:

if ((next.getName().startsWith("get") && next.getName().length() > 3) || (next.getName().startsWith("is") && next.getName().length() > 2)) {
Comment 1 David McCann CLA 2010-10-05 10:54:02 EDT
(In reply to comment #0)
> When we process get method in getPropertyPropertiesForClass in
> AnnotationsProcessor, we should only process ones that have exactly one input
> parameter, and a non-void return type.
> 
> More than likely the change will be required to the following line of code:
> 
> if ((next.getName().startsWith("get") && next.getName().length() > 3) ||
> (next.getName().startsWith("is") && next.getName().length() > 2)) {

The get method should have zero arguments, and a non-void return type.
Comment 2 David McCann CLA 2010-10-05 12:00:16 EDT
Created attachment 180253 [details]
Contains proposed fix + supporting test case
Comment 3 David McCann CLA 2010-10-05 12:10:32 EDT
Reviewed by:  matt.macivor@oracle.com
Tests:  jaxb/xmlelement/XmlElementNamespaceTestCases; all unit tests pass as expected
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:05:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink