Skip to content

Commit f8c0c85

Browse files
committed
refactor(rings): resolve InefficientStringBuffering PMD errors
1 parent 915f8d4 commit f8c0c85

File tree

1 file changed

+6
-2
lines changed
  • polybench/solvers/rings/src/main/java/com/github/tueda/polybench/rings

1 file changed

+6
-2
lines changed

polybench/solvers/rings/src/main/java/com/github/tueda/polybench/rings/App.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@ private static String doFactor(final String line, final String... variables) {
6161
MultivariateFactorization.Factor(p);
6262
long t2 = System.nanoTime();
6363
StringBuilder result = new StringBuilder();
64-
result.append((t2 - t1) / 1.0e9 + "," + factors.unit);
64+
result.append((t2 - t1) / 1.0e9).append(',').append(factors.unit);
6565
for (int i = 0; i < factors.size(); i++) {
66-
result.append(",(" + factors.get(i).toString(variables) + ")^" + factors.getExponent(i));
66+
result
67+
.append(",(")
68+
.append(factors.get(i).toString(variables))
69+
.append(")^")
70+
.append(factors.getExponent(i));
6771
}
6872
return result.toString();
6973
}

0 commit comments

Comments
 (0)