commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Steelman" <>
Subject RE: [Digester] enums in ConvertUtils.register
Date Wed, 15 Jun 2005 07:19:18 GMT
Okay, my bad. I tested ConvertUtils directly and it works as does

However, it brings up the point that ConvertUtils.convert(String, Class)
should automatically handle the case of the Class is an enum by using
the enum's built in valueOf(String) method so that a custom Converter is
not required. Is this the forum to make that suggestion?


-----Original Message-----
From: Simon Kitching [] 
Sent: Wednesday, June 15, 2005 12:11 AM
To: Jakarta Commons Users List
Subject: Re: [Digester] enums in ConvertUtils.register

On Tue, 2005-06-14 at 20:32 -0400, Jon Steelman wrote:
> I just tried to register a Java 1.5 enum class, but Digester seems not
> to work with it. No exceptions are thrown during
> ConvertUtils.register(myConverter, SomeEnum.class) or during a parsing
> match of digester.parse. I'm using Digester 1.7

I would hope it works; it seems a reasonable thing to do. However
java1.5 enums are fairly cutting-edge so there may be some issue.

Unfortunately, as far as I am aware, you are the first to try using
ConvertUtils with enums so you're probably going to have to figure out
what the issue is yourself. I would suggest first writing a simple test
using ConvertUtils directly; if that doesn't work then the problem is
not Digester.



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

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

View raw message