Skip to content

Fix refactor/s3024 stringbuilder append#17234

Merged
HTHou merged 2 commits intoapache:masterfrom
anukalp2804:fix_refactor/S3024_stringbuilder_append
Mar 3, 2026
Merged

Fix refactor/s3024 stringbuilder append#17234
HTHou merged 2 commits intoapache:masterfrom
anukalp2804:fix_refactor/S3024_stringbuilder_append

Conversation

@anukalp2804
Copy link
Contributor

Summary

This PR resolves SonarCloud rule java:S3024 by replaces string concatenation inside StringBuilder.append() with multiple append calls.This avoids creating an unnecessary temporary String object.

Affected Code

Before
builder.append(dataIterator.getString(columnName) + " ");
After
builder.append(dataIterator.getString(columnName)).append(" ");

This PR has:

  • been self-reviewed.
    - [x] mvn clean package -pl distribution -am -DskipTests
    - [x] mvn spotless:check
    - [x] mvn spotless:apply

Resolves : https://sonarcloud.io/project/issues?open=AZfI-87Z6bx1nQBkaMUy&id=apache_iotdb

@HTHou HTHou merged commit 9c11cfd into apache:master Mar 3, 2026
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants