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

Code style issues in the foreign API

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • None
    • repo-panama
    • core-libs

    Description

      A pass on the API code revealed the following style issues:

      * chained calls (Stream/Optional) not always occur on separate lines
      * parameter names sometimes are inconsistent
      * inconsistent cast formatting (e.g. (Foo)foo or (Foo) foo)
      * Use static imports for Objects.requireNonNull() [optional - JDK is inconsistent about this]
      * inconsistent class naming in internal packages
      * methods and classes should be final where possible
      * Methods and properties should be sorted in some order
      * interfaces should be used where possible (this should already be the case, especially after latest changes to layout API)
      * Cleanup the way method parameters (e.g. one on each line) and class declarations (e.g. extends, implements, permits)
      * Generally make classes smaller (move to util methods for example)
      * Move out some default implementations from interfaces to internal util methods

      Attachments

        Issue Links

          Activity

            People

              pminborg Per-Ake Minborg
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: