Skip to content

Commit

Permalink
fix apache#6728, potential NPE in generic filter (apache#6785)
Browse files Browse the repository at this point in the history
  • Loading branch information
yizhenqiang authored Oct 5, 2020
1 parent 0a14ffc commit eed216b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ public Result invoke(Invoker<?> invoker, Invocation inv) throws RpcException {
args = new Object[params.length];
}

if(types == null) {
types = new String[params.length];
}

if (args.length != types.length) {
throw new RpcException("args.length != types.length");
throw new RpcException("GenericFilter#invoke args.length != types.length, please check your "
+ "params");
}
String generic = inv.getAttachment(GENERIC_KEY);

Expand Down

0 comments on commit eed216b

Please sign in to comment.