myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anita Anandan <>
Subject DateTimeConverter's patterns
Date Fri, 29 Aug 2008 02:45:00 GMT
I had a couple questions on 

This method creates a set of patterns to match against the user provided 
input string. Of course, we start with the format associated with the 
current locale. But to make our converter more friendly, we also try 
with 3 other patterns for convenience (TRINIDAD-859).

(a) The patterns variable is of type HashSet. Set (and its 
implementation HashSet) do not provide any guarantee of iteration. Do we 
not care about the order in which we try to make matches? Note that in 
the client validation code, we use an array which imposes an order.

(b) Also, the 3 static strings do not take into consideration the 
locale. So for e.g. no matter if the locale is en_us (USA) or en 
(Europe) the first static pattern is MM dd yy. This seems confusing.

Any feedback would be useful.


View raw message