hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzh...@apache.org
Subject hadoop git commit: HADOOP-14511. WritableRpcEngine.Invocation#toString NPE on null parameters. Contributed by John Zhuge.
Date Fri, 09 Jun 2017 04:30:25 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 8188b9dd0 -> 87f4428de


HADOOP-14511. WritableRpcEngine.Invocation#toString NPE on null parameters. Contributed by
John Zhuge.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/87f4428d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/87f4428d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/87f4428d

Branch: refs/heads/branch-2
Commit: 87f4428de017e5bfc4358304728bd2281d501d52
Parents: 8188b9d
Author: John Zhuge <jzhuge@apache.org>
Authored: Thu Jun 8 14:01:31 2017 -0700
Committer: John Zhuge <jzhuge@apache.org>
Committed: Thu Jun 8 21:26:02 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/ipc/WritableRpcEngine.java    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/87f4428d/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
index 9579503..df45d62 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
@@ -182,10 +182,13 @@ public class WritableRpcEngine implements RpcEngine {
       StringBuilder buffer = new StringBuilder();
       buffer.append(methodName);
       buffer.append("(");
-      for (int i = 0; i < parameters.length; i++) {
-        if (i != 0)
-          buffer.append(", ");
-        buffer.append(parameters[i]);
+      if (parameters != null) {
+        for (int i = 0; i < parameters.length; i++) {
+          if (i != 0) {
+            buffer.append(", ");
+          }
+          buffer.append(parameters[i]);
+        }
       }
       buffer.append(")");
       buffer.append(", rpc version="+rpcVersion);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message