首先预览下,本次发布的核心内容 :
[Feature] :new:
说明:
示例: NumberUtil.getAddValue(2, 4, 5) = 11 NumberUtil.getAddValue(new BigDecimal(6), 5) = 11 NumberUtil.getAddValue(new BigDecimal(6), null) = 6
主要作用,是在异常message 中追加 cause exception信息,方便查看排查问题 对比 empty message 如下代码 public void testRuntimeException(){ try{ int i = 1 / 0; }catch (Exception e){ throw new RuntimeException("", e); } } 抛出的异常情况在控制台是这样的 java.lang.RuntimeException: at com.feilong.core.DefaultRuntimeExceptionTest.testRuntimeException(DefaultRuntimeExceptionTest.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at java.lang.reflect.Method.invoke(Method.java:606) Caused by: java.lang.ArithmeticException: / by zero at com.feilong.core.DefaultRuntimeExceptionTest.testRuntimeException(DefaultRuntimeExceptionTest.java:61) ... 23 more 而如果使用 DefaultRuntimeException public void testDefaultRuntimeException(){ try{ int i = 1 / 0; }catch (Exception e){ throw new DefaultRuntimeException("", e); } } 抛出来的信息是这样的 com.feilong.core.DefaultRuntimeException: **java.lang.ArithmeticException: / by zero** at com.feilong.core.DefaultRuntimeExceptionTest.testDefaultRuntimeException(DefaultRuntimeExceptionTest.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) Caused by: java.lang.ArithmeticException: / by zero at com.feilong.core.DefaultRuntimeExceptionTest.testDefaultRuntimeException(DefaultRuntimeExceptionTest.java:51) ... 23 more [Update]
[Remove]
[Fix Bug] :bug:
[javadoc]
[test]
[help wanted]
本次升级共有 1.11.5 文档地址: http://feilong-core.mydoc.io/ |