public StackTraceElement[] deobfuscateStackTrace(StackTraceElement[] st, String strongName) { return super.resymbolize(st, strongName); }
/** * Replaces the stack traces in the given Throwable and its causes with deobfuscated stack traces * wherever possible. * * @param throwable the Throwable that needs its stack trace to be deobfuscated * @param strongName the GWT permutation strong name */ public final void deobfuscateStackTrace(Throwable throwable, String strongName) { throwable.setStackTrace(resymbolize(throwable.getStackTrace(), strongName)); if (throwable.getCause() != null) { deobfuscateStackTrace(throwable.getCause(), strongName); } }
/** * Convenience method which resymbolizes an entire stack trace to extent possible. * * @param st the stack trace to resymbolize * @param strongName the GWT permutation strong name * @return a best effort resymbolized stack trace */ public final StackTraceElement[] resymbolize(StackTraceElement[] st, String strongName) { if (st == null) { return null; } // Warm the symbol cache for all symbols in this stack trace. Set<String> requiredSymbols = new HashSet<String>(); for (StackTraceElement ste : st) { requiredSymbols.add(ste.getMethodName()); } loadSymbolMap(strongName, requiredSymbols); StackTraceElement[] newSt = new StackTraceElement[st.length]; for (int i = 0; i < st.length; i++) { newSt[i] = resymbolize(st[i], strongName); } return newSt; }
public StackTraceElement[] deobfuscateStackTrace(StackTraceElement[] st, String strongName) { return super.resymbolize(st, strongName); }
public StackTraceElement[] deobfuscateStackTrace(StackTraceElement[] st, String strongName) { return super.resymbolize(st, strongName); }
/** * Replaces the stack traces in the given Throwable and its causes with deobfuscated stack traces * wherever possible. * * @param throwable the Throwable that needs its stack trace to be deobfuscated * @param strongName the GWT permutation strong name */ public final void deobfuscateStackTrace(Throwable throwable, String strongName) { throwable.setStackTrace(resymbolize(throwable.getStackTrace(), strongName)); if (throwable.getCause() != null) { deobfuscateStackTrace(throwable.getCause(), strongName); } }
/** * Replaces the stack traces in the given Throwable and its causes with deobfuscated stack traces * wherever possible. * * @param throwable the Throwable that needs its stack trace to be deobfuscated * @param strongName the GWT permutation strong name */ public final void deobfuscateStackTrace(Throwable throwable, String strongName) { throwable.setStackTrace(resymbolize(throwable.getStackTrace(), strongName)); if (throwable.getCause() != null) { deobfuscateStackTrace(throwable.getCause(), strongName); } }
/** * Replaces the stack traces in the given Throwable and its causes with deobfuscated stack traces * wherever possible. * * @param throwable the Throwable that needs its stack trace to be deobfuscated * @param strongName the GWT permutation strong name */ public final void deobfuscateStackTrace(Throwable throwable, String strongName) { throwable.setStackTrace(resymbolize(throwable.getStackTrace(), strongName)); if (throwable.getCause() != null) { deobfuscateStackTrace(throwable.getCause(), strongName); } }
/** * Convenience method which resymbolizes an entire stack trace to extent possible. * * @param st the stack trace to resymbolize * @param strongName the GWT permutation strong name * @return a best effort resymbolized stack trace */ public final StackTraceElement[] resymbolize(StackTraceElement[] st, String strongName) { if (st == null) { return null; } // Warm the symbol cache for all symbols in this stack trace. Set<String> requiredSymbols = new HashSet<String>(); for (StackTraceElement ste : st) { requiredSymbols.add(ste.getMethodName()); } loadSymbolMap(strongName, requiredSymbols); StackTraceElement[] newSt = new StackTraceElement[st.length]; for (int i = 0; i < st.length; i++) { newSt[i] = resymbolize(st[i], strongName); } return newSt; }
/** * Convenience method which resymbolizes an entire stack trace to extent possible. * * @param st the stack trace to resymbolize * @param strongName the GWT permutation strong name * @return a best effort resymbolized stack trace */ public final StackTraceElement[] resymbolize(StackTraceElement[] st, String strongName) { if (st == null) { return null; } // Warm the symbol cache for all symbols in this stack trace. Set<String> requiredSymbols = new HashSet<String>(); for (StackTraceElement ste : st) { requiredSymbols.add(ste.getMethodName()); } loadSymbolMap(strongName, requiredSymbols); StackTraceElement[] newSt = new StackTraceElement[st.length]; for (int i = 0; i < st.length; i++) { newSt[i] = resymbolize(st[i], strongName); } return newSt; }
/** * Convenience method which resymbolizes an entire stack trace to extent possible. * * @param st the stack trace to resymbolize * @param strongName the GWT permutation strong name * @return a best effort resymbolized stack trace */ public final StackTraceElement[] resymbolize(StackTraceElement[] st, String strongName) { if (st == null) { return null; } // Warm the symbol cache for all symbols in this stack trace. Set<String> requiredSymbols = new HashSet<String>(); for (StackTraceElement ste : st) { requiredSymbols.add(ste.getMethodName()); } loadSymbolMap(strongName, requiredSymbols); StackTraceElement[] newSt = new StackTraceElement[st.length]; for (int i = 0; i < st.length; i++) { newSt[i] = resymbolize(st[i], strongName); } return newSt; }
private void deobfuscate(WrappedClientThrowable wrappedClientThrowable) { if (wrappedClientThrowable == null) { // no throwable to deobfuscate return; } // recursive deobfuscate(wrappedClientThrowable.getCause()); String permutationStrongName = getPermutationStrongName(); if ("HostedMode".equals(permutationStrongName)) { // For Development Mode return; } StackTraceElement[] originalStackTrace = wrappedClientThrowable.getClientStackTrace(); StackTraceElement[] deobfuscatedStackTrace = originalStackTrace; for (StackTraceDeobfuscator deobf : deobfuscatorList) { deobfuscatedStackTrace = deobf.resymbolize(deobfuscatedStackTrace, permutationStrongName); } // Verify each permutation once that a symbolMap is available if (permutationStrongNamesChecked.add(permutationStrongName)) { if (equal(originalStackTrace, deobfuscatedStackTrace)) { Log.warn("Failed to deobfuscate stack trace for permutation " + permutationStrongName + ". Verify that the corresponding symbolMap is available."); } } wrappedClientThrowable.setClientStackTrace(deobfuscatedStackTrace); }