Bug 216414 - Patch for: Elapsed time in test result window shows wrong formatted time (seconds instead milliseconds) on non-english locale
Patch for: Elapsed time in test result window shows wrong formatted time (sec...
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Maven
7.2
PC Windows 7
: P3 (vote)
: 7.3
Assigned To: Milos Kleint
issues@projects
:
: 213648 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-05 21:17 UTC by markiewb
Modified: 2012-10-25 10:48 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Screenshot shows the wrong formatted time (72.20 KB, image/png)
2012-08-05 21:17 UTC, markiewb
Details
Proposed patch - 4 lines change (1.77 KB, patch)
2012-10-08 12:53 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2012-08-05 21:17:34 UTC
Created attachment 122758 [details]
Screenshot shows the wrong formatted time

Elapsed time in test result window shows wrong formatted time (seconds instead milliseconds)

Steps for reproduction
* generate a maven project
* add a simple junit test, which sleeps for 1 second
* run the test

ACTUAL: the test result window shows a elapsed time of 1000 seconds 
EXPECTED: the test result window shows a elapsed time of    1 second 

The maven console output shows the correct elapsed time, but the time is shown wrong in the test result window. See the attached screenshot.

Could it be an issue with my locale de_de?

----
Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.6.0_30; Java HotSpot(TM) 64-Bit Server VM 20.5-b03
System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)
Comment 1 markiewb 2012-10-08 12:53:01 UTC
Created attachment 125583 [details]
Proposed patch - 4 lines change

Proposed patch to fix the issue.

// the surefire plugin does not print out localized numbers, so use the English format

Instead of 
NumberFormat.getNumberInstance() (this will use the system locale)
use
NumberFormat.getNumberInstance(Locale.ENGLISH)
Comment 2 Theofanis Oikonomou 2012-10-15 12:17:09 UTC
Patch looks ok. re-assigning to owner to integrate.
Comment 3 Theofanis Oikonomou 2012-10-15 16:22:58 UTC
*** Bug 213648 has been marked as a duplicate of this bug. ***
Comment 4 Milos Kleint 2012-10-22 06:30:45 UTC
applied, thank you.

http://hg.netbeans.org/core-main/rev/200806a7e56a
Comment 5 Quality Engineering 2012-10-25 10:48:44 UTC
Integrated into 'main-golden', will be available in build *201210250921* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/200806a7e56a
User: Milos Kleint <mkleint@netbeans.org>
Log: #216414 use localized numberformat, patch provided by markiewb@netbeans.org


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo