You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "PJ Fanning (Jira)" <ji...@apache.org> on 2022/05/17 18:07:00 UTC

[jira] [Comment Edited] (XMLBEANS-606) XMLError don't respect default Locale for number formatting

    [ https://issues.apache.org/jira/browse/XMLBEANS-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538374#comment-17538374 ] 

PJ Fanning edited comment on XMLBEANS-606 at 5/17/22 6:06 PM:
--------------------------------------------------------------

Unfortunately, XmlOptions is not available in XmlError class. The advantage of static classes and/or ThreadLocals is that you don't need to pass instances of classes around to get access to the config state.

I'm not at all anxious to spend time rewriting large amounts of XmlBeans code to try to get the XmlOptions passed around. There are other places that use Locale.ROOT too - some which might have access to XmlOptions but certainly not all cases have ready access to XmlOptions.

A class like POI's LocaleUtil would be much quicker to implement.


was (Author: pj.fanning):
Unfortunately, XmlOptions is not available in XmlError class. The advantage of static classes and/or ThreadLocals is that you don't need to pass instances of classes around to get access to the config state.

I'm not at all anxious to spend time rewriting large amounts of XmlBeans code to try to get the XmlOptions passed around.

A class like POI's LocaleUtil would be much quicker to implement.

> XMLError don't respect default Locale for number formatting
> -----------------------------------------------------------
>
>                 Key: XMLBEANS-606
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-606
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 5.0.3
>            Reporter: Yanick Vuille
>            Priority: Major
>
> The class XMLError uses `Locale.ROOT` to format messages instead of using `Locale.getDefault()`.
> This results in badly formatted error messages. The separators are not necessarily the right ones depending on the locale.
> Version 3 took into account the default locale, since version 4 the locale is forced to 'Locale.ROOT'



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org