HBASE-9224 Print out name of the method we do not support rather than throw NPE

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1514102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-08-14 23:56:14 +00:00
parent e926483258
commit 92190aa973
1 changed files with 1 additions and 0 deletions

View File

@ -1650,6 +1650,7 @@ public class RpcServer implements RpcServerInterface {
try {
if (header.hasRequestParam() && header.getRequestParam()) {
md = this.service.getDescriptorForType().findMethodByName(header.getMethodName());
if (md == null) throw new UnsupportedOperationException(header.getMethodName());
Builder builder = this.service.getRequestPrototype(md).newBuilderForType();
// To read the varint, I need an inputstream; might as well be a CIS.
cis = CodedInputStream.newInstance(buf, offset, buf.length);