Skip to content
Permalink
Browse files
7473: Unable to view constants in constant pool page.
Reviewed-by: jpbempel, hirt
  • Loading branch information
aptmac committed Jan 12, 2022
1 parent b6bf40f commit dbb3e76d6f9e7a993b1eac37b2cbfeb09bef65ef
Showing 1 changed file with 10 additions and 6 deletions.
@@ -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));
}

0 comments on commit dbb3e76

Please sign in to comment.