Skip to content

Commit 494edb4

Browse files
committed
Missing Unsafe class yields NoClassDefFoundError so checking for Exception is not really appropriate. Let's catch all throwables.
1 parent d1034ed commit 494edb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/rx/internal/util/unsafe/UnsafeAccess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private UnsafeAccess() {
4141
Field field = Unsafe.class.getDeclaredField("theUnsafe");
4242
field.setAccessible(true);
4343
u = (Unsafe) field.get(null);
44-
} catch (Exception e) {
44+
} catch (Throwable e) {
4545
// do nothing, hasUnsafe() will return false
4646
}
4747
UNSAFE = u;

0 commit comments

Comments
 (0)