Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
13
-
b16
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8334820 | 11.0.25-oracle | Ivan Bereziuk | P4 | Resolved | Fixed | b01 |
JDK-8224797 | 11.0.4 | Goetz Lindenmaier | P4 | Resolved | Fixed | b05 |
Description
A row of exceptions are thrown from the hotspot runtime.
They print methods with their JNI signatures. To increase
readability and resemblance to source code, print them
in a Java-like syntax.
Some examples:
current method printouts:
test.TeMe3_B.ma()V
test.TeMe3_B.ma(IZ[[BF)[[D
test.TeMe3_B.ma([[[Ljava/lang/Object;)[[Ltest/TeMe3_B;
improved format:
void test.TeMe3_B.ma()
double[][] test.TeMe3_B.ma(int, boolean, byte[][], float)
test.TeMe3_B[][] test.TeMe3_B.ma(java.lang.Object[][][])
So far, Method::name_and_sig_as_C_string() is used to print
these messages.
Implement function Method::external_name() that prints the better
format.
external_name() is chosen according to Klass::external_name().
Printing the better format requires parsing the signature
Symbol. This is implemented in
void Symbol::print_as_signature_external_return_type(outputStream *os);
void Symbol::print_as_signature_external_parameters(outputStream *os);
These method names are chosen according to Symbol::as_class_external_name().
Adapt printing messages and according tests.
They print methods with their JNI signatures. To increase
readability and resemblance to source code, print them
in a Java-like syntax.
Some examples:
current method printouts:
test.TeMe3_B.ma()V
test.TeMe3_B.ma(IZ[[BF)[[D
test.TeMe3_B.ma([[[Ljava/lang/Object;)[[Ltest/TeMe3_B;
improved format:
void test.TeMe3_B.ma()
double[][] test.TeMe3_B.ma(int, boolean, byte[][], float)
test.TeMe3_B[][] test.TeMe3_B.ma(java.lang.Object[][][])
So far, Method::name_and_sig_as_C_string() is used to print
these messages.
Implement function Method::external_name() that prints the better
format.
external_name() is chosen according to Klass::external_name().
Printing the better format requires parsing the signature
Symbol. This is implemented in
void Symbol::print_as_signature_external_return_type(outputStream *os);
void Symbol::print_as_signature_external_parameters(outputStream *os);
These method names are chosen according to Symbol::as_class_external_name().
Adapt printing messages and according tests.
Attachments
Issue Links
- backported by
-
JDK-8224797 Print methods in exception messages in java-like Syntax.
-
- Resolved
-
-
JDK-8334820 Print methods in exception messages in java-like Syntax.
-
- Resolved
-
- blocks
-
JDK-8222005 ClassRedefinition crashes with: guarantee(false) failed: OLD and/or OBSOLETE method(s) found
-
- Resolved
-
- is blocked by
-
JDK-8205611 Improve the wording of LinkageErrors to include module and class loader information
-
- Resolved
-