Github user bgould commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/743#discussion_r47486573
  
    --- Diff: lib/java/test/org/apache/thrift/TestStruct.java ---
    @@ -309,11 +309,33 @@ public void testToString() throws Exception {
       }
     
       public void testBytesBufferFeatures() throws Exception {
    -    JavaTestHelper o = new JavaTestHelper();
    +    
    +    final String testString = "testBytesBufferFeatures";
    +    final JavaTestHelper o = new JavaTestHelper();
    +
         o.setReq_bin((ByteBuffer)null);
         assertNull(o.getReq_bin());
    +
    +    o.setReq_bin(ByteBuffer.wrap(testString.getBytes()));
    +    assertNotNull(o.getReq_bin());
    --- End diff --
    
    Yes, couldn't hurt.  Really I was just trying to test to make sure it 
doesn't trigger a ClassCastException; but your suggestion seems logical.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to