You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by br...@apache.org on 2006/01/03 17:47:41 UTC

svn commit: r365680 - in /jakarta/commons/proper/math/trunk: src/java/org/apache/commons/math/complex/ComplexFormat.java xdocs/changes.xml

Author: brentworden
Date: Tue Jan  3 08:47:38 2006
New Revision: 365680

URL: http://svn.apache.org/viewcvs?rev=365680&view=rev
Log:
PR: 38091
ComplexFormat was not formatting double values with the provided NumberFormat.  Instead, the real part format was always used.

Modified:
    jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java
    jakarta/commons/proper/math/trunk/xdocs/changes.xml

Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java?rev=365680&r1=365679&r2=365680&view=diff
==============================================================================
--- jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java (original)
+++ jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java Tue Jan  3 08:47:38 2006
@@ -212,7 +212,7 @@
             toAppendTo.append(value);
             toAppendTo.append(')');
         } else {
-            getRealFormat().format(value, toAppendTo, pos);
+            format.format(value, toAppendTo, pos);
         }
         return toAppendTo;
     }
@@ -467,7 +467,7 @@
      */
     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

Modified: jakarta/commons/proper/math/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/math/trunk/xdocs/changes.xml?rev=365680&r1=365679&r2=365680&view=diff
==============================================================================
--- jakarta/commons/proper/math/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/math/trunk/xdocs/changes.xml Tue Jan  3 08:47:38 2006
@@ -39,6 +39,10 @@
   </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.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org