commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [2/3] [math] Unnecessary String creation.
Date Tue, 31 May 2016 00:48:20 GMT
Unnecessary String creation.

Thanks to Dave Brosius.


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

Branch: refs/heads/develop
Commit: 362ab2bc41697980391c4a61c23cb3ef6bce740c
Parents: 633de29
Author: Gilles <gilles@harfang.homelinux.org>
Authored: Tue May 31 02:30:47 2016 +0200
Committer: Gilles <gilles@harfang.homelinux.org>
Committed: Tue May 31 02:30:47 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/commons-math/blob/362ab2bc/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