commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject [math] use StringBuilder correctly
Date Sun, 29 May 2016 21:36:15 GMT
Repository: commons-math
Updated Branches:
  refs/heads/master 7c12a85bf -> 292b6ab08


use StringBuilder correctly


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/292b6ab0
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/292b6ab0
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/292b6ab0

Branch: refs/heads/master
Commit: 292b6ab0811f5b21db8cc15929e41a2175d142c4
Parents: 7c12a85
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Sun May 29 17:36:04 2016 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Sun May 29 17:36:04 2016 -0400

----------------------------------------------------------------------
 .../math4/stat/descriptive/MultivariateSummaryStatistics.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/292b6ab0/src/main/java/org/apache/commons/math4/stat/descriptive/MultivariateSummaryStatistics.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/descriptive/MultivariateSummaryStatistics.java
b/src/main/java/org/apache/commons/math4/stat/descriptive/MultivariateSummaryStatistics.java
index eb1642c..39083d0 100644
--- a/src/main/java/org/apache/commons/math4/stat/descriptive/MultivariateSummaryStatistics.java
+++ b/src/main/java/org/apache/commons/math4/stat/descriptive/MultivariateSummaryStatistics.java
@@ -319,8 +319,8 @@ public class MultivariateSummaryStatistics
         final String separator = ", ";
         final String suffix = System.getProperty("line.separator");
         StringBuilder outBuffer = new StringBuilder();
-        outBuffer.append("MultivariateSummaryStatistics:" + suffix);
-        outBuffer.append("n: " + getN() + suffix);
+        outBuffer.append("MultivariateSummaryStatistics:").append(suffix);
+        outBuffer.append("n: ").append(getN()).append(suffix);
         append(outBuffer, getMin(), "min: ", separator, suffix);
         append(outBuffer, getMax(), "max: ", separator, suffix);
         append(outBuffer, getMean(), "mean: ", separator, suffix);
@@ -328,7 +328,7 @@ public class MultivariateSummaryStatistics
         append(outBuffer, getSumSq(), "sum of squares: ", separator, suffix);
         append(outBuffer, getSumLog(), "sum of logarithms: ", separator, suffix);
         append(outBuffer, getStandardDeviation(), "standard deviation: ", separator, suffix);
-        outBuffer.append("covariance: " + getCovariance().toString() + suffix);
+        outBuffer.append("covariance: ").append(getCovariance()).append(suffix);
         return outBuffer.toString();
     }
 


Mime
View raw message