You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2022/05/18 19:46:00 UTC
[jira] [Commented] (THRIFT-5345) Allow the ServerContext to be Unwrapped Programmatically
[ https://issues.apache.org/jira/browse/THRIFT-5345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17539041#comment-17539041 ]
Sylwester Lachiewicz commented on THRIFT-5345:
----------------------------------------------
Already merged into v0.14.0 with https://github.com/apache/thrift/commit/ebc2ab558dce946b2a3134028b08ed59d49cd1e3
> Allow the ServerContext to be Unwrapped Programmatically
> ---------------------------------------------------------
>
> Key: THRIFT-5345
> URL: https://issues.apache.org/jira/browse/THRIFT-5345
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Library
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Labels: Breaking-Change, api-addition
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> From Apache Hive:
> {code:java}
> public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output) {
> ...
> ThriftCLIServerContext context = (ThriftCLIServerContext) serverContext;
> }
> {code}
> This proposed change allows for a cleaner approach:
> {code:java}
> public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output) {
> ...
> ThriftCLIServerContext context = serverContext.unwrap(ThriftCLIServerContext.class);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)