[
https://issues.apache.org/jira/browse/HADOOP-18803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18029358#comment-18029358
]
ASF GitHub Bot commented on HADOOP-18803:
-----------------------------------------
github-actions[bot] closed pull request #6075: HADOOP-18803. ClassCastException
in test TestRPC#testWrappedStopProxy
URL: https://github.com/apache/hadoop/pull/6075
> ClassCastException in test TestRPC#testWrappedStopProxy
> -------------------------------------------------------
>
> Key: HADOOP-18803
> URL: https://issues.apache.org/jira/browse/HADOOP-18803
> Project: Hadoop Common
> Issue Type: Bug
> Components: common, ipc
> Reporter: ConfX
> Priority: Critical
> Labels: pull-request-available
> Attachments: reproduce.sh
>
>
> h2. What happened:
> In HCommon, test TestRPC#testWrappedStopProxy tries to cast
> org.apache.hadoop.ipc.WritableRpcEngine$Invoker to
> org.apache.hadoop.ipc.TestRPC$StoppedInvocationHandler and causes
> ClassCastException.
> h2. Buggy code:
> In TestRPC.java:
> {code:java}
> @Test
> public void testWrappedStopProxy() throws IOException {
> StoppedProtocol wrappedProxy = RPC.getProxy(StoppedProtocol.class,
> StoppedProtocol.versionID, null, conf);
> StoppedInvocationHandler invocationHandler = (StoppedInvocationHandler)
> // <--- Here causes ClassCastException
> Proxy.getInvocationHandler(wrappedProxy);
> ...
> } {code}
> h2. How to reproduce:
> (1) Just directly run test TestRPC#testWrappedStopProxy.
> You can use the reproduce.sh in the attachment to easily reproduce the bug.
> We are happy to provide a patch if this issue is confirmed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]