You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "fishy (via GitHub)" <gi...@apache.org> on 2023/04/05 21:16:43 UTC

[GitHub] [thrift] fishy commented on a diff in pull request #2772: THRIFT-5696: Allow custom TConfiguration for TByteBuffer.java

fishy commented on code in PR #2772:
URL: https://github.com/apache/thrift/pull/2772#discussion_r1159030073


##########
lib/java/src/test/java/org/apache/thrift/transport/TestTByteBuffer.java:
##########
@@ -39,4 +41,29 @@ public void testOverflow() throws Exception {
             () -> byteBuffer.write("Hello World".getBytes(StandardCharsets.UTF_8)));
     assertEquals("Not enough room in output buffer", e.getMessage());
   }
+
+  @Test
+  public void testSmallTConfiguration() throws Exception {
+    // Test that TByteBuffer init fail with small max message size.
+    final TConfiguration configSmall =
+        new TConfiguration(
+            4, TConfiguration.DEFAULT_MAX_FRAME_SIZE, TConfiguration.DEFAULT_RECURSION_DEPTH);

Review Comment:
   I'm not sure if we have a java style guide or something but this style looks weird to me, but that might be just me (as I don't write java nowadays).



-- 
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: notifications-unsubscribe@thrift.apache.org

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