mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
[autotune] Fix key on CallStack - regression from introduction of StackWalker.StackFrame
This commit is contained in:
@@ -41,14 +41,14 @@ public final class CallStack implements Serializable, CallOrigin {
|
||||
public CallStack(List<StackWalker.StackFrame> frames) {
|
||||
this.callStack = frames.toArray(new Object[0]);
|
||||
this.hc = computeHashCode();
|
||||
this.zeroHash = enc(callStack[0].hashCode());
|
||||
this.zeroHash = enc(callStack[0].toString().hashCode());
|
||||
this.pathHash = enc(hc);
|
||||
}
|
||||
|
||||
private int computeHashCode() {
|
||||
int hc = 0;
|
||||
for (Object element : callStack) {
|
||||
hc = 92821 * hc + element.hashCode();
|
||||
hc = 92821 * hc + element.toString().hashCode();
|
||||
}
|
||||
return hc;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ public final class StackWalkFilter {
|
||||
public boolean test(StackWalker.StackFrame stackFrame) {
|
||||
return !stackFrame.getClassName().startsWith("io.ebean")
|
||||
&& !stackFrame.getClassName().startsWith("jdk.")
|
||||
&& !stackFrame.getClassName().startsWith("java.")
|
||||
&& !stackFrame.getMethodName().startsWith("_ebean_");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user