[
https://issues.apache.org/jira/browse/MATH-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16596171#comment-16596171
]
Gilles commented on MATH-1467:
------------------------------
{quote}I call getMessage() wich in turns call getMessage(Locale.US) in
ExceptionContext class.
{quote}
Oops. I guess that, at the time, it looked like having to create a message
meant raising an exception and, supposedly, the end of the processing; so that
performance was not an issue.
I've never been convinced that localization had its place in a low level
library (such as CM). Mainly because messages coming from that level lack
context, and almost always require a developer to look into the code for fixing
a bug or finding a way to protect upper layers from low-level failures. Hence
this person needs to read English...
I'm also worried that the call for loading the {{ResourceBundle}} uses a
hard-coded "/" filesystem separator to construct a "path", whereas the Javadoc
refers to a fully qualified "class" name. I don't know if it's going to always
work...
{quote}should this fix be backported to 3.6 branches
{quote}
Unfortunately, lacking human resources, it has not been possible to maintain
this line of code.
Cf. ML archive for (a lot of nasty) details.
More manageable/maintainable components are being split off:
* Commons RNG
* Commons Statistics
* Commons Numbers
* Commons Geometry
* ...
on which the development version of "Commons Math" now depends.
The master branch contains so many fixes and improvements that releasing a 3.x
version would be inviting people to use known-to-be-buggy code.
I'd like to release a version 4.0 (even if all the refactoring work is not over
yet; perhaps a "beta" version). This would require releasing the above
dependencies first. Again, the lack of human resources has been the main cause
for delay.
Help is most welcome.
> Avoid throwing exceptions when using default locale
> ---------------------------------------------------
>
> Key: MATH-1467
> URL: https://issues.apache.org/jira/browse/MATH-1467
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.6.1
> Reporter: Gregory Jevardat
> Priority: Major
> Attachments: LocalizedFormats.java, LocalizedFormatsTest.java
>
>
> In the LocalizedFormats class the method getLocalizedString systematically
> throws an exception when the US or EN locale is used.
> It occurs because it tries to load the bundle in any case and obviously the
> properties file for EN does not exist.
> Maybe a little check if an EN locale is used and then returning the
> sourceFormat would avoid trying to load the bundle and throw exceptions.
> In my case we have intensive (billions) statistical computations and Java
> Mission Control reports 10-100k's of MissingResourcesExceptions caused by
> that.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)