Skip to content

Commit 1a7de42

Browse files
JakeWhartonakarnokd
authored andcommitted
Remove explicit StackOverflow check as its a VirtualMachineError. (#4390)
Looks like [the linked comment][1] was misinterpreted (but not in a way that affected the implementation) as Scala considered StackOverflowError as non-fatal but RxJava always considered it fatal. As such, its explicit check was redundant. [1]: #748 (comment)
1 parent a57741b commit 1a7de42

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/rx/exceptions/Exceptions.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public static RuntimeException propagate(Throwable t) {
6565
* <li>{@link OnErrorNotImplementedException}</li>
6666
* <li>{@link OnErrorFailedException}</li>
6767
* <li>{@link OnCompletedFailedException}</li>
68-
* <li>{@code StackOverflowError}</li>
6968
* <li>{@code VirtualMachineError}</li>
7069
* <li>{@code ThreadDeath}</li>
7170
* <li>{@code LinkageError}</li>
@@ -88,9 +87,7 @@ public static void throwIfFatal(Throwable t) {
8887
throw (OnCompletedFailedException) t;
8988
}
9089
// values here derived from https://github.com/ReactiveX/RxJava/issues/748#issuecomment-32471495
91-
else if (t instanceof StackOverflowError) {
92-
throw (StackOverflowError) t;
93-
} else if (t instanceof VirtualMachineError) {
90+
else if (t instanceof VirtualMachineError) {
9491
throw (VirtualMachineError) t;
9592
} else if (t instanceof ThreadDeath) {
9693
throw (ThreadDeath) t;

0 commit comments

Comments
 (0)