commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject [6/8] [text] TEXT-32: Switching StringBuffer to StringBuilder
Date Fri, 23 Dec 2016 14:12:02 GMT
TEXT-32: Switching StringBuffer to StringBuilder


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/4263ce38
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/4263ce38
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/4263ce38

Branch: refs/heads/master
Commit: 4263ce38d789622ec107f2d666586c8a8de219aa
Parents: f6dd715
Author: Rob Tompkins <chtompki@gmail.com>
Authored: Fri Dec 23 08:57:52 2016 -0500
Committer: Rob Tompkins <chtompki@gmail.com>
Committed: Fri Dec 23 08:57:52 2016 -0500

----------------------------------------------------------------------
 .../apache/commons/text/similarity/LongestCommonSubsequence.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/4263ce38/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
b/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
index 1f132ef..5c063bf 100644
--- a/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
+++ b/src/main/java/org/apache/commons/text/similarity/LongestCommonSubsequence.java
@@ -90,7 +90,7 @@ public class LongestCommonSubsequence implements SimilarityScore<Integer>
{
         if (left == null || right == null) {
             throw new IllegalArgumentException("Inputs must not be null");
         }
-        StringBuffer longestCommonSubstringArray = new StringBuffer(Math.max(left.length(),
right.length()));
+        StringBuilder longestCommonSubstringArray = new StringBuilder(Math.max(left.length(),
right.length()));
         int[][] lcsLengthArray = longestCommonSubstringLengthArray(left, right);
         int i = left.length() - 1;
         int j = right.length() - 1;


Mime
View raw message