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 Jozef Krssak <jo...@gmail.com> on 2007/09/26 10:23:15 UTC

Problem with ConverterUtil convertTo* methods and empty XML tag

Hi

During tests of Axis2 1.3 parser speed performance for our existing project
we have found big problem in
org.apache.axis2.databinding.utils.ConverterUtil and its convertTo* methods
when  processed XML has some empty tags. Convert methods have no code to
test given parameter to 'null' value or value equals to "".

To be able to parse any XML we had to add the following simple code into
these methods:
        if (s == null || "".equals(s)) {
          return null;
        }

We think it will be worth to fix it and add this simple code.
Thanks

-- 
Jozef Krssak

Re: Problem with ConverterUtil convertTo* methods and empty XML tag

Posted by Jozef Krssak <jo...@gmail.com>.
Hi
I do not believe that nobody has problem with ConverterUtil methods and
empty tags in processed XML.
I have attached my version of
org.apache.axis2.databinding.utils.ConverterUtil with some essential checks.
Of course some 'return null' can be changed to 'return ""'.
If somebody agree then it could be used in original Axis2 code or if there
is any other solution, please send information.

Thanks and Regards

-- 
Jozef Krssak

On 9/26/07, Jozef Krssak <jo...@gmail.com> wrote:
>
> Hi
>
> During tests of Axis2 1.3 parser speed performance for our existing
> project we have found big problem in
> org.apache.axis2.databinding.utils.ConverterUtil and its convertTo*
> methods when  processed XML has some empty tags. Convert methods have no
> code to test given parameter to 'null' value or value equals to "".
>
> To be able to parse any XML we had to add the following simple code into
> these methods:
>         if (s == null || "".equals(s)) {
>           return null;
>         }
>
> We think it will be worth to fix it and add this simple code.
> Thanks
>
> --
> Jozef Krssak
>
>