Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [smila-dev] Datamodel: Value.asXXX methods should autoconvert fromstring

… and after an update I see it too ;)

 

sorry about that and thanks for putting this in.

 

Thomas Menzel @ brox IT-Solutions GmbH

 

From: smila-dev-bounces@xxxxxxxxxxx [mailto:smila-dev-bounces@xxxxxxxxxxx] On Behalf Of Andreas.Weber@xxxxxxxxxxxxx
Sent: Dienstag, 26. April 2011 11:39
To: smila-dev@xxxxxxxxxxx
Subject: Re: [smila-dev] Datamodel: Value.asXXX methods should autoconvert fromstring

 

Hi Thomas,

 

hmm, thought the current implementation would already be working the way you want to change it now.  

And when I look at the code, it seems to be right there (?)

 

Cheers,

Andreas

 

 

Von: smila-dev-bounces@xxxxxxxxxxx [mailto:smila-dev-bounces@xxxxxxxxxxx] Im Auftrag von Thomas Menzel
Gesendet: Dienstag, 26. April 2011 11:22
An: Smila project developer mailing list
Betreff: [smila-dev] Datamodel: Value.asXXX methods should autoconvert fromstring

 

hi,

 

I just noticed that the asXXX()conversion methods don’t autoconvert from string, e.g. the ValueType is STRING but the value is "true" and I'm calling asBoolean() . I think and propose to extend the current impl. to try to convert strings to the resquested type and if that fails throw an InvalidValueTypeException as is done now immediately.

 

pro: SMILA becomes more fault tolerant regarding configuration

cons: support for sloppy configuration style resulting in performance degradation

 

how do u see this proposal and should we do this?

 

me: +1 – of course!

 

Thomas Menzel @ brox IT-Solutions GmbH

 


Back to the top