(final Throwable t)
| 346 | } |
| 347 | |
| 348 | @GwtIncompatible // invokeAccessibleNonThrowingMethod |
| 349 | private static List<StackTraceElement> jlaStackTrace(final Throwable t) { |
| 350 | checkNotNull(t); |
| 351 | /* |
| 352 | * TODO(cpovirk): Consider optimizing iterator() to catch IOOBE instead of doing bounds checks. |
| 353 | * |
| 354 | * TODO(cpovirk): Consider the UnsignedBytes pattern if it performs faster and doesn't cause |
| 355 | * AOSP grief. |
| 356 | */ |
| 357 | return new AbstractList<StackTraceElement>() { |
| 358 | @Override |
| 359 | public StackTraceElement get(int n) { |
| 360 | return (StackTraceElement) |
| 361 | invokeAccessibleNonThrowingMethod(getStackTraceElementMethod, jla, t, n); |
| 362 | } |
| 363 | |
| 364 | @Override |
| 365 | public int size() { |
| 366 | return (Integer) invokeAccessibleNonThrowingMethod(getStackTraceDepthMethod, jla, t); |
| 367 | } |
| 368 | }; |
| 369 | } |
| 370 | |
| 371 | @GwtIncompatible // java.lang.reflect |
| 372 | private static Object invokeAccessibleNonThrowingMethod( |
no test coverage detected