Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7473: Unable to view constants in constant pool page. #348

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Datadog, Inc. All rights reserved.
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2022, Datadog, Inc. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -290,10 +290,14 @@ public <M> IMemberAccessor<M, IItem> getAccessor(IAccessorKey<M> attribute) {
}
if ("constant".equals(attribute.getIdentifier())) {
if (constant instanceof IMCStackTrace) {
IMCFrame imcFrame = ((IMCStackTrace) constant).getFrames().get(0);
String str = StacktraceFormatToolkit.formatFrame(imcFrame,
new FrameSeparator(FrameCategorization.METHOD, false));
return ((IMemberAccessor<M, IItem>) MemberAccessorToolkit.<IItem, Object, Object> constant(str));
IMCStackTrace stackTrace = ((IMCStackTrace) constant);
if (!stackTrace.getFrames().isEmpty()) {
IMCFrame imcFrame = (stackTrace).getFrames().get(0);
String str = StacktraceFormatToolkit.formatFrame(imcFrame,
new FrameSeparator(FrameCategorization.METHOD, false));
return ((IMemberAccessor<M, IItem>) MemberAccessorToolkit
.<IItem, Object, Object> constant(str));
}
}
return ((IMemberAccessor<M, IItem>) MemberAccessorToolkit.<IItem, Object, Object> constant(constant));
}