commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject RE: [Digester] enums in ConvertUtils.register
Date Wed, 15 Jun 2005 08:58:49 GMT
On Wed, 2005-06-15 at 04:30 -0400, Jon Steelman wrote:
> I wrote the following code that works on jdk1.5 *and* I expect to be
> backwards compatible to jdk1.1:

That was quick!

This looks reasonable to me. The reflection is of course slow, but for
non-enum targets, the cost is fairly low.

Could you create a bugzilla enhancement entry for this? I will then try
to commit it within the next few days.

There are a few issues that need to be addressed, though:
* Is clazz always going to be a direct subclass of java.lang.Enum?
  I don't think you can subclass enums, but haven't looked into this.
  And what about when the enum is in a nested class, etc?
* Need to handle the error cases better. As you say, these should
  never occur - but never is a dangerous word in the software
  world :) Actually - can an enum be private? What happens in that case?

I guess I need to learn more about java1.5 enums!

Thanks very much for the patch.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message