2 Replies Latest reply on Oct 13, 2008 3:35 PM by Francisco Jose Peredo Noguez

    Why org.jboss.seam.util.Conversions ignores Dates?

    Francisco Jose Peredo Noguez Master

      Hi!
      I am having some problems with Date conversions (if I need to pass a page parameter of type java.util.Date it crashes).
      I still do not know the root source of this problem, but I found something in org.jboss.seam.util.Conversions that is bothering me:


       private static Map<Class, Converter> converters = new HashMap<Class, Converter>() {{
            put(String.class, new StringConverter());
            put(Boolean.class, new BooleanConverter());
            put(boolean.class, new BooleanConverter());
            put(Integer.class, new IntegerConverter());
            put(int.class, new IntegerConverter());
            put(Long.class, new LongConverter());
            put(long.class, new LongConverter());
            put(Float.class, new FloatConverter());
            put(float.class, new FloatConverter());
            put(Double.class, new DoubleConverter());
            put(double.class, new DoubleConverter());
            put(Character.class, new CharacterConverter());
            put(char.class, new CharacterConverter());
            put(String[].class, new StringArrayConverter());
            put(Set.class, new SetConverter());
            put(List.class, new ListConverter());
            put(Map.class, new MapConverter());
            put(Properties.class, new PropertiesConverter());
            //put(Date.class, new DateTimeConverter());
            //put(Short.class, new ShortConverter());
            //put(Byte.class, new ByteConverter());
            put(Enum.class, new EnumConverter());
            put(BigInteger.class, new BigIntegerConverter());
            put(BigDecimal.class, new BigDecimalConverter());
            put(Class.class, new ClassConverter());
         }};
      




      Why is the line for Date.class commented? It seems like it has been like that since the beginning. Could this be causing some trouble?