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

StandardJavaFileManager::setLocationForModule specification misses 'Implementation Requirements:'

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 18
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      binary
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      A clarification is made to the spec. There is no functional change in behavior.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add an @implSpec for the default method for setLocationForModule.

      Problem

      While the method in question has a suitable @throws clause, unlike other default methods, it does not have an @implSpec tag. For consistency, it would be better if it did.

      Solution

      Add a boilerplate @implSpec for consistency with the other default methods on this interface.

      Specification

      diff --git a/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java b/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java
      --- a/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java  (revision 4a7ccf36e9a3978c437db3efe892dd23e8a0b772)
      +++ b/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java  (date 1626230189255)
      @@ -372,6 +372,9 @@
            * {@linkplain #setLocation setLocation} or
            * {@linkplain #setLocationFromPaths setLocationFromPaths}.
            *
      +     * @implSpec
      +     * The default implementation throws {@link UnsupportedOperationException}.
      +     *
            * @throws IllegalStateException if the location is not a module-oriented
            *  or output location.
            * @throws UnsupportedOperationException if this operation is not supported by

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jjg Jonathan Gibbons
              Reporter:
              dbessono Dmitry Bessonov
              Reviewed By:
              Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: