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

test jdk/jshell/CompletenessTest.java fails for records

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Withdrawn
    • Fix Version/s: 14
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      source
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API

      Description

      Summary

      jdk.jshell.Snippet.SubKind contains constants for different types of jshell snippets, and differentiated between classes, enums, interfaces and annotations. It should also show records separately.

      Problem

      The jdk.jshell.Snippet.SubKind enum does not contain an enum constant for records.

      Solution

      A new constant, RECORD_SUBKIND, is added into jdk.jshell.Snippet.SubKind.

      Specification

      The exact proposed change is:

      @@ -234,10 +234,26 @@
                * @jls 8.9 Enum Types
                */
               ENUM_SUBKIND(Kind.TYPE_DECL),
      
               /**
      +         * {@preview Associated with records, a preview feature of the Java language.
      +         *
      +         *           This enum constant is associated with records, a preview
      +         *           feature of the Java language. Preview features
      +         *           may be removed in a future release, or upgraded to permanent
      +         *           features of the Java language.}
      +         *
      +         * A record declaration.
      +         * A {@code SubKind} of {@link Kind#TYPE_DECL}.
      +         * @jls 8.10 Record Types
      +         *
      +         */
      +        @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS)
      +        RECORD_SUBKIND(Kind.TYPE_DECL),
      +
      +        /**
                * An annotation interface declaration. A {@code SubKind} of
                * {@link Kind#TYPE_DECL}.
                * @jls 9.6 Annotation Types
                */
               ANNOTATION_TYPE_SUBKIND(Kind.TYPE_DECL),
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jlahoda Jan Lahoda
              Reporter:
              vromero Vicente Arturo Romero Zaldivar
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: