[ https://issues.apache.org/jira/browse/THRIFT-5345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Mollitor updated THRIFT-5345: ----------------------------------- Labels: Breaking-Change api-addition (was: api-change) > 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: 10m > 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.3.4#803005)