DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20666>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20666

JavaUtils.isEnumClass is inefficient

           Summary: JavaUtils.isEnumClass is inefficient
           Product: Axis
           Version: current (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


JavaUtils.isEnumClass is implemented inefficiently.  It performs several
reflection queries on class objects and uses try{} catch{} blocks to make
decisions about the interface of those objects.  This results in the creation of
exception objects and the execution of costly exception handling code for common
cases which are not at all exceptional (i.e. cases where classes are not
enumerations)

Also, the current implementation checks for the presence of a toString() method,
which is unnecessary since that method is on every class, courtesy of
java.lang.Object.

I'll follow this report with a patch which addresses these issues.

Reply via email to