You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/07/09 08:03:32 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #2396: HDDS-5422. Avoid eager string formatting in preconditions

adoroszlai commented on a change in pull request #2396:
URL: https://github.com/apache/ozone/pull/2396#discussion_r666755050



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -65,9 +65,9 @@ void addPipeline(Pipeline pipeline) throws IOException {
     Preconditions.checkArgument(
         pipeline.getNodes().size() == pipeline.getReplicationConfig()
             .getRequiredNodes(),
-        String.format("Nodes size=%d, replication factor=%d do not match ",
+        "Nodes size=%s, replication factor=%s do not match ",

Review comment:
       `Preconditions` (or rather `Strings#lenientFormat` to which it delegates) only supports `%s` placeholders.




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org