| Summary: | JAXB Externalized Metadata: GetMethod should be checked for zero input arguments, and non-void return type | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | David McCann <david.mccann> | ||||
| Component: | Eclipselink | Assignee: | David McCann <david.mccann> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 354646 | ||||||
| Attachments: |
|
||||||
(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. Created attachment 180253 [details]
Contains proposed fix + supporting test case
Reviewed by: matt.macivor@oracle.com Tests: jaxb/xmlelement/XmlElementNamespaceTestCases; all unit tests pass as expected The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
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)) {