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

Review comments to follow up for patterns implementation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: repo-amber
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A grab bag of comments that may need follow up or at least another pair of eyes looking over.

      These are mostly in the form of spring clean up sort of comments. For actual
      defects discovered, separate tickets have been raised.

      // -------------------------------
      ConstantPatternTree.java:
          - Remove redundant public modifier of getValue()
          - Should this have been named getExpression() ala CaseTree ?
          - Should the javadoc says return the constant expression of this pattern and not value ?

      MatchesTree.java:
          - Fix javadoc: A tree node for an {@code matches} expression. (an => a)
          - Should getPattern() return PatternTree ? ala CaseTree.getPattern() ?

      PatternTree.java:

          - Fix javadoc: "A doc to make build happy @return something"- This is public API.
          - Should getBinding() be actually getName() ala VariableTree ?

      VariablePatternTree.java:

          - Fix javadoc: "Returns the type of the bind variable."
          - What does it return for var patterns ?

      Tokens.java:

          __match is still a context sensitive token ??

      jshell/CompletenessAnalyzer.java:

          __match is still a token ?


      JCTree.java:

          JCTree.Tag.CLAUSE unused.

      Pretty.java:

          printPatterns method is unused

      JavacParser.java

          - Remove unused import SwitchKind
          - Renmove references to unused token__match ? (MATCH)

      Flow.java:

          - Comment in com.sun.tools.javac.comp.Flow#aliveAfterCase has suspect references to lambdas
          - Is com.sun.tools.javac.comp.Flow.AssignAnalyzer#visitTypeTestPattern correctly named ?
            Is that supposed to be visitVariablePattern ?
          - Likewise for com.sun.tools.javac.comp.Flow.CaptureAnalyzer#visitTypeTestPattern ??

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sadayapalam Srikanth Adayapalam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: