You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Christopher Tubbs (Jira)" <ji...@apache.org> on 2022/05/18 21:14:00 UTC
[jira] [Resolved] (THRIFT-5345) Allow the ServerContext to be Unwrapped Programmatically
[ https://issues.apache.org/jira/browse/THRIFT-5345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christopher Tubbs resolved THRIFT-5345.
---------------------------------------
Fix Version/s: 0.14.0
Resolution: Fixed
> 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
> Fix For: 0.14.0
>
> 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)