directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <>
Subject Re: A small hint when using Enum in the codec
Date Thu, 11 Nov 2010 11:08:21 GMT
> Don't be as idiot as I was : use getValue instead of getOrdinal, which
> is based on the field order. Also always declare a 'value' field, not an
> 'ordinal' field, as it was done in many case...

Well, it depends always on the use case. Some time ago when I fixed 
DIRSHARED-64 (Transform IStates and inherited interfaces/implementing 
classes to enums) I finally realized, that it's not really necessary to 
have a custom value. Sometimes the use of the ordinal can make sense as 
well (

View raw message