You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pe...@apache.org on 2019/12/12 11:39:06 UTC
[ranger] branch master updated: RANGER-2565: Remove duplicate error
messages when test connection fails
This is an automated email from the ASF dual-hosted git repository.
pengjianhua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new 733c28e RANGER-2565: Remove duplicate error messages when test connection fails
733c28e is described below
commit 733c28e640c035526a7656091752b58f2846b506
Author: xingpeng1 <xi...@zte.com.cn>
AuthorDate: Wed Sep 11 17:44:37 2019 +0800
RANGER-2565: Remove duplicate error messages when test connection fails
Signed-off-by: peng.jianhua <pe...@zte.com.cn>
---
.../src/main/java/org/apache/ranger/plugin/client/HadoopException.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopException.java b/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopException.java
index 5c2660f..d66e6e1 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopException.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopException.java
@@ -59,7 +59,7 @@ public class HadoopException extends RuntimeException {
public String getMessage(Throwable excp) {
List<String> errList = new ArrayList<>();
while (excp != null) {
- if (!errList.contains(excp.getMessage() + ". \n")) {
+ if (!errList.contains(excp.getMessage() + ". \n") && !errList.contains(excp.toString() + ". \n")) {
if (excp.getMessage() != null && !(excp.getMessage().equalsIgnoreCase(""))) {
errList.add(excp.getMessage() + ". \n");
}