You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "kpumuk (via GitHub)" <gi...@apache.org> on 2025/12/15 21:47:51 UTC

[PR] THRIFT-5909: Addressed discrepancy in the non-accelerated union implementation [thrift]

kpumuk opened a new pull request, #3269:
URL: https://github.com/apache/thrift/pull/3269

   <!-- Explain the changes in the pull request below: -->
   
   When binary extension is not available (for example, in JRuby), Thrift::Union throws an unexpected NoMethodError instead of the intended error:
   
     1) Union Thrift::Union should raise for wrong set field when hash initialized and type checking is off
        Failure/Error: expect { Thrift::Serializer.new.serialize(union) }.to raise_error(RuntimeError, "set_field is not valid for this union!")
   
          expected RuntimeError with "set_field is not valid for this union!", got #<NoMethodError: undefined method '[]' for nil> with backtrace:
            # ./lib/thrift/union.rb:78:in 'write'
            # ./lib/thrift/serializer/serializer.rb:29:in 'serialize'
            # ./spec/union_spec.rb:54:in 'block in <main>'
            # ./spec/union_spec.rb:54:in 'block in <main>'
        # ./spec/union_spec.rb:54:in 'block in <main>'  
   
   <!-- We recommend you review the checklist/tips before submitting a pull request. -->
   
   - [x] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? [THRIFT-5909](https://issues.apache.org/jira/browse/THRIFT-5909)
   - [x] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
   - [x] Did you squash your changes to a single commit?  (not required, but preferred)
   - [x] Did you do your best to avoid breaking changes?  If one was needed, did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources.
   
   <!--
     The Contributing Guide at:
     https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
     has more details and tips for committing properly.
   -->
   


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

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


Re: [PR] THRIFT-5909: Addressed discrepancy in the non-accelerated union implementation [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3269:
URL: https://github.com/apache/thrift/pull/3269


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

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