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=15439>.
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=15439

Enum does not support inner sub-classes

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From [EMAIL PROTECTED]  2003-01-29 16:12 -------
I found a bug with my original very simplisting solution. The follwing is the
correct algorythm to determine the actual enumeration class for a given
enumeration object which may be defined by an inner class. I've attached the
patched class and a test class.

// Search for actual enumerated type. This is necessary as enumerated types might
// be defined by inner classes. The actual enumerated type is defined as the top
container or
// declaring class that can be assigned to the actual class of enumeration being
added.
Class clazz = this.getClass();
while (clazz.getDeclaringClass() != null &&     
clazz.getDeclaringClass().isAssignableFrom(this.getClass())) {
        clazz = clazz.getSuperclass();
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to