提交 4eeb430a 编写于 作者: W william.liangf

DUBBO-207 打印容错的异常日志,防止掩盖问题

git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@897 1a56cb94-b969-4eaa-88fa-be21384802f2
上级 ef0bafcc
......@@ -340,7 +340,7 @@ public abstract class AbstractConfig implements Serializable {
try {
String name = method.getName();
if ((name.startsWith("get") || name.startsWith("is"))
&& ! "getClass".equals(name) && ! "get".equals(name)&& ! "is".equals(name)
&& ! "getClass".equals(name) && ! "get".equals(name) && ! "is".equals(name)
&& Modifier.isPublic(method.getModifiers())
&& method.getParameterTypes().length == 0
&& isPrimitive(method.getReturnType())) {
......@@ -362,6 +362,7 @@ public abstract class AbstractConfig implements Serializable {
buf.append(" />");
return buf.toString();
} catch (Throwable t) { // 防御性容错
logger.warn(t.getMessage(), t);
return super.toString();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册