Community
Participate
Working Groups
Build Identifier: built using maven 2, java version "1.6.0_26" UnitFormatTest.toStringTest() fails because it tries to compare units symbols that are locale specific. In the test's source code it is 'm' for metre compared to a symbol from message resources. On machine with different locale settings (e.g. russian with cyrillic) it will be different and they will not match. Reproducible: Always Steps to Reproduce: 1. Setup russian locale 2. Run maven package
Created attachment 202765 [details] UnitFormatTest surefire report
Peter, Thanks a lot for sharing that. I placed a link to the original issue in the heritage from JSR-275 here, too. This test is among those influenced by the Unit JSR proposal. It should work equally well using the COMPARISON_LOCALE, I'll fix it as soon as I can. Should you have a patch, please feel free to attach it here (it isn't too obvious, but this URL explains relatively well how to create at patch with Git: http://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/) P.s.: The JSR also contained many translations, some of which are supposed to go into Eclipse Babel. The initial import may have lost them, but I'm hoping to add them for other languages than German, too. If you're interested and able, please use your Bugzilla ID to join Babel: http://babel.eclipse.org/ adding further Russian translations to UOMo and other projects. Thanks, Werner
Changed the method from toString() test to also use a UnitFormat. Since the test as such compares multiple operations, toString() isn't the only way to retrieve and compare those. Tests pass as before, should work regardless of the default locale.
Considering closed