File tree Expand file tree Collapse file tree
rxjava2debug/src/main/java/com/akaita/java/rxjava2debug Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525class ExceptionUtils {
2626
2727 static Throwable setRootCause (@ NonNull Throwable throwable , @ NonNull Throwable rootCause ) {
28- if (throwable == null ){
29- return null ;
30- }
31- if (rootCause == null ) {
32- return throwable ;
33- }
34-
3528 List <Throwable > causes = listCauses (throwable );
3629 causes .add (rootCause );
3730 return collapseCauses (causes );
Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ public static void disableRxJava2AssemblyTracking() {
6161 /**
6262 * Obtain a copy of the original Throwable with an extended StackTrace
6363 * @param original Original Throwable
64- * @return new Throwable with enhanced StackTrace if information was found. <i>null </i> otherwise
64+ * @return new Throwable with enhanced StackTrace if information was found. <i>Original Throwable </i> otherwise
6565 */
66- public static @ Nullable Throwable getEnhancedStackTrace (Throwable original ) {
66+ public static @ NonNull Throwable getEnhancedStackTrace (@ NonNull Throwable original ) {
6767 Throwable enhanced = original ;
6868
6969 RxJavaAssemblyException assembledException = RxJavaAssemblyException .find (original );
@@ -86,12 +86,7 @@ private static void setRxJavaAssemblyHandler() {
8686 @ Override
8787 public void uncaughtException (Thread t , Throwable e ) {
8888 Throwable enhancedStackTrace = getEnhancedStackTrace (e );
89-
90- if (enhancedStackTrace != null ) {
91- previousDefaultHandler .uncaughtException (t , enhancedStackTrace );
92- } else {
93- previousDefaultHandler .uncaughtException (t , e );
94- }
89+ previousDefaultHandler .uncaughtException (t , enhancedStackTrace );
9590 }
9691 });
9792 }
You can’t perform that action at this time.
0 commit comments