We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f3eecac + 8cd2956 commit 01cb9f8Copy full SHA for 01cb9f8
1 file changed
tests/test_languages/fixtures/java_tracer_e2e/src/main/java/com/example/Workload.java
@@ -14,11 +14,12 @@ public static int computeSum(int n) {
14
}
15
16
public static String repeatString(String s, int count) {
17
- String result = "";
18
- for (int i = 0; i < count; i++) {
19
- result = result + s;
+ if (count <= 0) {
+ return "";
20
21
- return result;
+ // Preserve original behavior where null becomes "null"
+ String unit = String.valueOf(s);
22
+ return unit.repeat(count);
23
24
25
public static List<Integer> filterEvens(List<Integer> numbers) {
0 commit comments