Skip to content

Bump org.junit:junit-bom from 6.0.0 to 6.0.1

d3f71ba
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

Bump org.junit:junit-bom from 6.0.0 to 6.0.1 #50

Bump org.junit:junit-bom from 6.0.0 to 6.0.1
d3f71ba
Select commit
Loading
Failed to load commit list.
GitHub Actions / spotbugs completed Nov 3, 2025 in 0s

SpotBugs Source Code Analyzer report

1 violation(s) found

Annotations

Check warning on line 178 in src/main/java/org/metricshub/vcenter/VCenterClient.java

See this annotation in the file changed.

@github-actions github-actions / spotbugs

SBSC_USE_STRINGBUFFER_CONCATENATION

org.metricshub.vcenter.VCenterClient.getHostSystemManagedEntity(ServiceInstance, String) concatenates strings using + in a loop
Raw output
 The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration. 

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 5) explicitly.

 For example:

// This is bad
String s = "";
for (int i = 0; i < field.length; ++i) {
    s = s + field[i];
}

// This is better
StringBuffer buf = new StringBuffer();
for (int i = 0; i < field.length; ++i) {
    buf.append(field[i]);
}
String s = buf.toString();