Abacn commented on code in PR #35684:
URL: https://github.com/apache/beam/pull/35684#discussion_r2311684697
##########
examples/java/src/main/java/org/apache/beam/examples/complete/StreamingWordExtract.java:
##########
@@ -123,13 +123,11 @@ public static void main(String[] args) throws IOException
{
Pipeline pipeline = Pipeline.create(options);
String tableSpec =
- new StringBuilder()
- .append(options.getProject())
- .append(":")
- .append(options.getBigQueryDataset())
- .append(".")
- .append(options.getBigQueryTable())
- .toString();
+ options.getProject()
Review Comment:
Yeah: https://errorprone.info/bugpattern/UnnecessaryStringBuilder
FYI the full warning
```
> Compilation failed; see the compiler output below.
.../beam/examples/java/src/main/java/org/apache/beam/examples/complete/StreamingWordExtract.java:132:
warning: [UnnecessaryStringBuilder] Prefer string concatenation over
explicitly using `StringBuilder#append`, since `+` reads better and has
equivalent or better performance.
.toString();
^
(see https://errorprone.info/bugpattern/UnnecessaryStringBuilder)
Did you mean 'options.getProject() + ":" + options.getBigQueryDataset()
+ "." + options.getBigQueryTable();'?
1 error
1 warning
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]