Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8234971

Incorrect example in j.l.reflect.RecordComponent::toString

    Details

      Description

      Specification for j.l.reflect.RecordComponent::toString says:

      "Returns a string describing this record component. The format is the record component type, followed by a space, followed by the name of the record component. For example:

          String name"

      This doesn't conform to the OpenJDK implementation since the following:

              record R(String name) {};
              System.out.println(R.class.getRecordComponents()[0]);

      would print out:

      java.lang.String name

        Attachments

          Activity

            People

            • Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              dbessono Dmitry Bessonov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: