You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2021/03/01 08:19:52 UTC

[GitHub] [httpcomponents-core] ok2c commented on a change in pull request #271: feature/pmd warnings

ok2c commented on a change in pull request #271:
URL: https://github.com/apache/httpcomponents-core/pull/271#discussion_r584517300



##########
File path: httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/DefaultFrameFactory.java
##########
@@ -39,31 +39,35 @@
 public class DefaultFrameFactory extends FrameFactory {
 
     public static final FrameFactory INSTANCE = new DefaultFrameFactory();
+    /**
+     * A String for a {@code "Stream id"}.
+     */
+    private static final String STREAM_ID = "Stream id";
 
     @Override
     public RawFrame createHeaders(final int streamId, final ByteBuffer payload, final boolean endHeaders, final boolean endStream) {
-        Args.positive(streamId, "Stream id");
+        Args.positive(streamId, STREAM_ID);

Review comment:
       @arturobernalg Why? What is exactly the benefit of doing so?




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org