MCPcopy Create free account
hub / github.com/antlr/codebuff / jlaStackTrace

Method jlaStackTrace

corpus/java/training/guava/base/Throwables.java:348–369  ·  view source on GitHub ↗
(final Throwable t)

Source from the content-addressed store, hash-verified

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(

Callers 1

lazyStackTraceMethod · 0.95

Calls 1

checkNotNullMethod · 0.45

Tested by

no test coverage detected