JDK-8134939 : Improve toString method of Dynalink DynamicMethod objects
  • Type: Enhancement
  • Component: core-libs
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-09-02
  • Updated: 2016-01-14
  • Resolved: 2015-09-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u72Fixed 9 b81Fixed
jjs> java.lang.System.out.println
[jdk.internal.dynalink.beans.OverloadedDynamicMethod java.io.PrintStream.println]

Instead of the above, it toString returned all overloads, we could have output that looks like:

jjs> java.lang.System.out.println
void java.io.PrintStream.println(long)
void java.io.PrintStream.println(Object)
void java.io.PrintStream.println(char[])
void java.io.PrintStream.println()
void java.io.PrintStream.println(float)
void java.io.PrintStream.println(boolean)
void java.io.PrintStream.println(char)
void java.io.PrintStream.println(int)
void java.io.PrintStream.println(double)
void java.io.PrintStream.println(String)

also, constructors look unwieldy, e.g.

[jdk.internal.dynalink.beans.SimpleDynamicMethod File java.io.File.java.io.File(String,String)]

It'd be much better if they looked like a Java constructor:

[jdk.internal.dynalink.beans.SimpleDynamicMethod java.io.File(String,String)]