RE: NumberFormatException in EXTERNAL_RESOURCES

Hi Guido,  
  
Thank you very much for this.  
It seems like my IDE made magical text formatting introducing these characters.  
The problem was in some of the XSL tests that we committed last Monday  
(EXTERNAL_RESOURCES, GRAPHICS_FOR_SPACING and IMAGES_SPECIFY_SIZE)  

We have committed the proper ones without these errors

Regards


>>-----Mensaje original-----
>>De: public-mobileok-checker-request@w3.org [mailto:public-mobileok-
>>checker-request@w3.org] En nombre de Guido García Bernardo
>>Enviado el: miércoles, 30 de enero de 2008 10:24
>>Para: public-mobileok-checker
>>Asunto: NumberFormatException in EXTERNAL_RESOURCES
>>
>>
>>Hi,
>>
>>I hope I'm wrong, but I think there is a little bug in the
>>EXTERNAL_RESOURCES test.
>>This is the stack trace I get.  You can reproduce it by running the
>>Tester against http://www.htmlpoint.com/guida/html_11.htm
>>
>>Exception in thread "main" java.lang.NumberFormatException: For input
>>string: "2
>>                        "
>>    at java.lang.NumberFormatException.forInputString(Unknown Source)
>>    at java.lang.Integer.parseInt(Unknown Source)
>>    at java.lang.Integer.parseInt(Unknown Source)
>>    at
>>org.w3c.mwi.mobileok.basic.TestSubResult.<init>(TestSubResult.java:40)
>>    at
>>org.w3c.mwi.mobileok.basic.AbstractTestImplementation.runTest(AbstractTest
>>Implementation.java:28)
>>    ...
>>
>>The latest ExternalResourcesTest.xsl in the CVS (1.4) is
>>
>>...
>>    <xsl:call-template name="result">
>>        <xsl:with-param name="name">
>>            EXTERNAL_RESOURCES-2
>>        </xsl:with-param>
>>        ...
>>    </xsl:call-template>
>>...
>>
>>so the following code doesn't work, because the "name" value is
>>""\n\t\t\t\t\t\t\tEXTERNAL_RESOURCES-2\n\t\t\t\t\t\t" instead of
>>"EXTERNAL_RESOURCES-2"
>>
>>...
>>TestSubResult(final Element result) {
>>        final String name = result.getAttribute("name");
>>        final int dash = name.indexOf((int) '-');
>>        this.subResultID = Integer.parseInt(name.substring(dash + 1));
>><= NumberFormatException
>>                ...
>>
>>You could fix it by omitting the leading and trailing tabs and line
>>breaks in the XSL (or by changing the Java code):
>>
>>...
>>    <xsl:call-template name="result">
>>        <xsl:with-param name="name">EXTERNAL_RESOURCES-2</xsl:with-param>
>>        ...
>>    </xsl:call-template>
>>...
>>
>>Maybe the same is happening in other tests.
>>
>>Regards,
>>guido.

Received on Wednesday, 30 January 2008 09:59:47 UTC