Skip to content

Commit

Permalink
8305490: CommandProcessor command "dumpclass" produces classes with i…
Browse files Browse the repository at this point in the history
…nvalid field descriptors

Reviewed-by: cjplummer, fparain
  • Loading branch information
asotona committed Apr 5, 2023
1 parent 9f587d2 commit 78ff454
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -300,7 +300,7 @@ public Symbol getSymbolFromIndex(int cpIndex, boolean injected) {

public int getFieldSignatureIndex(int index) {
if (index >= getJavaFieldsCount()) throw new IndexOutOfBoundsException("not a Java field;");
return getField(index).getGenericSignatureIndex();
return getField(index).getSignatureIndex();
}

public Symbol getFieldSignature(int index) {
Expand Down
3 changes: 2 additions & 1 deletion test/hotspot/jtreg/serviceability/sa/ClhsdbDumpclass.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -81,6 +81,7 @@ public static void main(String[] args) throws Exception {
System.err.println(out.getStderr());
out.shouldHaveExitValue(0);
out.shouldMatch("public class " + APP_DOT_CLASSNAME);
out.shouldNotContain("Error:");
} catch (SkippedException se) {
throw se;
} catch (Exception ex) {
Expand Down

1 comment on commit 78ff454

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.