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:34:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 72d895a11 -> a86081408


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

(cherry picked from commit 87f4428de017e5bfc4358304728bd2281d501d52)


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

Branch: refs/heads/branch-2.8
Commit: a86081408df2c8651d15be9d5375a785c00ed5b1
Parents: 72d895a
Author: John Zhuge <jzhuge@apache.org>
Authored: Thu Jun 8 21:31:00 2017 -0700
Committer: John Zhuge <jzhuge@apache.org>
Committed: Thu Jun 8 21:31:00 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/a8608140/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 12a3912..9ed710c 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