| Summary: | JAXB: Useless method in AnnotationsProcessor should be removed | ||||||
|---|---|---|---|---|---|---|---|
| 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: | |||||||
| Attachments: |
|
||||||
Since this is a public method, we should not remove it. Any useless code should be removed. Created attachment 179387 [details]
Proposed fix.
1 - Removed useless code that creates an array of JavaClass instances that is never used.
2 - Changed two spots that call into the method (XMLProcessor and AnnotationsProcessor) to pass in null instead of a JavaClass[] since it is never used.
3 - Updated method comments.
reviewed by: matt.macivor@oracle.com tests: all unit tests pass as expected The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
The following method creates a list of JavaClasses but does nothing with it, and therefore should be removed. Any place it is called should be replaced with 'checkForCallbackMethods()'. public void processJavaClasses(JavaClass[] classes) { ArrayList<JavaClass> classesToProcess = new ArrayList<JavaClass>(); for (JavaClass javaClass : classes) { classesToProcess.add(javaClass); } checkForCallbackMethods(); }