David Mollitor created THRIFT-5345: -------------------------------------- Summary: 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
>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.3.4#803005)