PR: 38091
ComplexFormat was not formatting double values with the provided NumberFormat. Instead, the real part format was always used. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@365680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
61f59a02e6
commit
b38463a5e3
|
@ -212,7 +212,7 @@ public class ComplexFormat extends Format implements Serializable {
|
|||
toAppendTo.append(value);
|
||||
toAppendTo.append(')');
|
||||
} else {
|
||||
getRealFormat().format(value, toAppendTo, pos);
|
||||
format.format(value, toAppendTo, pos);
|
||||
}
|
||||
return toAppendTo;
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ public class ComplexFormat extends Format implements Serializable {
|
|||
*/
|
||||
private Number parseNumber(String source, NumberFormat format, ParsePosition pos) {
|
||||
int startIndex = pos.getIndex();
|
||||
Number number = getRealFormat().parse(source, pos);
|
||||
Number number = format.parse(source, pos);
|
||||
int endIndex = pos.getIndex();
|
||||
|
||||
// check for error parsing number
|
||||
|
|
|
@ -39,6 +39,10 @@ Commons Math Release Notes</title>
|
|||
</properties>
|
||||
<body>
|
||||
<release version="1.2-SNAPSHOT" date="TBD">
|
||||
<action dev="brentworden" type="fix" issue="38091" due-to="Phil Steitz">
|
||||
Made ComplexFormat format double values with a provided NumberFormat
|
||||
instance instead of using the real part format for all values.
|
||||
</action>
|
||||
</release>
|
||||
<release version="1.1" date="2005-12-17"
|
||||
description="This is a maintenance release containing bug fixes and enhancements.
|
||||
|
|
Loading…
Reference in New Issue