You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Bernhard Schauer (JIRA)" <ji...@apache.org> on 2010/02/16 15:40:28 UTC

[jira] Created: (AXIS2-4626) Wrong Date handling in SimpleTypeMapper

Wrong Date handling in SimpleTypeMapper
---------------------------------------

                 Key: AXIS2-4626
                 URL: https://issues.apache.org/jira/browse/AXIS2-4626
             Project: Axis2
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.5.1
         Environment: Not relevant
            Reporter: Bernhard Schauer


Class SimpleTypeMapper

  Line 113 to 115:

        } else if (name.equals(W_DATE)) {
            return makeDate(text);
        }

  Line 312 to 314:

    public static Object makeDate(String source) {
        return ConverterUtil.convertToDateTime(source).getTime();
    }

I think the latter should return the result from ConverterUtil.convertToDate(source) not from convertToDateTime. If that is not possible, I'd expect ConverterUtil.convertToDateTime to also accept a date in the format "yyyy-mm-dd" not only in the long 19 character version? or am I wrong here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2-4626) Wrong Date handling in SimpleTypeMapper

Posted by "Bernhard Schauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernhard Schauer updated AXIS2-4626:
------------------------------------

    Description: 
Class SimpleTypeMapper

  Line 113 to 115:

        } else if (name.equals(W_DATE)) {
            return makeDate(text);
        }

  Line 312 to 314:

    public static Object makeDate(String source) {
        return ConverterUtil.convertToDateTime(source).getTime();
    }

I think the latter should return the result from ConverterUtil.convertToDate(source) not from convertToDateTime. If that is not possible, I'd expect ConverterUtil.convertToDateTime to also accept a date in the format "yyyy-mm-dd" not only in the long 19 character version? or am I wrong here? 

As Axis2 serializes Date Objects in my case (POJO Webservice) in the "yyyy-mm-dd" format to String, this format should definitely be accepted on clientside in my opinion.

  was:
Class SimpleTypeMapper

  Line 113 to 115:

        } else if (name.equals(W_DATE)) {
            return makeDate(text);
        }

  Line 312 to 314:

    public static Object makeDate(String source) {
        return ConverterUtil.convertToDateTime(source).getTime();
    }

I think the latter should return the result from ConverterUtil.convertToDate(source) not from convertToDateTime. If that is not possible, I'd expect ConverterUtil.convertToDateTime to also accept a date in the format "yyyy-mm-dd" not only in the long 19 character version? or am I wrong here?


> Wrong Date handling in SimpleTypeMapper
> ---------------------------------------
>
>                 Key: AXIS2-4626
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4626
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.5.1
>         Environment: Not relevant
>            Reporter: Bernhard Schauer
>
> Class SimpleTypeMapper
>   Line 113 to 115:
>         } else if (name.equals(W_DATE)) {
>             return makeDate(text);
>         }
>   Line 312 to 314:
>     public static Object makeDate(String source) {
>         return ConverterUtil.convertToDateTime(source).getTime();
>     }
> I think the latter should return the result from ConverterUtil.convertToDate(source) not from convertToDateTime. If that is not possible, I'd expect ConverterUtil.convertToDateTime to also accept a date in the format "yyyy-mm-dd" not only in the long 19 character version? or am I wrong here? 
> As Axis2 serializes Date Objects in my case (POJO Webservice) in the "yyyy-mm-dd" format to String, this format should definitely be accepted on clientside in my opinion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (AXIS2-4626) Wrong Date handling in SimpleTypeMapper

Posted by "Bernhard Schauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernhard Schauer closed AXIS2-4626.
-----------------------------------

    Resolution: Fixed

As I've seen, this is fixed in trunk.

> Wrong Date handling in SimpleTypeMapper
> ---------------------------------------
>
>                 Key: AXIS2-4626
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4626
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.5.1
>         Environment: Not relevant
>            Reporter: Bernhard Schauer
>
> Class SimpleTypeMapper
>   Line 113 to 115:
>         } else if (name.equals(W_DATE)) {
>             return makeDate(text);
>         }
>   Line 312 to 314:
>     public static Object makeDate(String source) {
>         return ConverterUtil.convertToDateTime(source).getTime();
>     }
> I think the latter should return the result from ConverterUtil.convertToDate(source) not from convertToDateTime. If that is not possible, I'd expect ConverterUtil.convertToDateTime to also accept a date in the format "yyyy-mm-dd" not only in the long 19 character version? or am I wrong here? 
> As Axis2 serializes Date Objects in my case (POJO Webservice) in the "yyyy-mm-dd" format to String, this format should definitely be accepted on clientside in my opinion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.