You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/06/11 00:58:13 UTC
DO NOT REPLY [Bug 20666] New: -
JavaUtils.isEnumClass is inefficient
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: axis-dev@ws.apache.org
ReportedBy: Eric.D.Friedman@wellsfargo.com
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.