This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Patch for: Elapsed time in test result window shows wrong formatted time (seconds instead milliseconds) on non-english locale | ||
---|---|---|---|
Product: | projects | Reporter: | markiewb |
Component: | Maven | Assignee: | Milos Kleint <mkleint> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | emi, markiewb, thgaw |
Priority: | P3 | ||
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Screenshot shows the wrong formatted time
Proposed patch - 4 lines change |
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)
Patch looks ok. re-assigning to owner to integrate. *** Bug 213648 has been marked as a duplicate of this bug. *** applied, thank you. http://hg.netbeans.org/core-main/rev/200806a7e56a 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 |
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)