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

SimpleFileServer#createFileServer() should specify that the returned server is not started

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 18
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      API doc only change, minor clarification.
    • Interface Kind:
      Java API
    • Scope:
      JDK

      Description

      Summary

      Specify the status of the returned server in the method-level documentation of SimpleFileServer::createFileServer.

      Problem

      The API doc does not specify the status of the returned server, which might lead to confusion.

      Solution

      Add a sentence that describes the status of the server.

      Specification

      src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java

           /**
            * Creates a <i>file server</i> that serves files from a given path.
            *
            * <p> The server is configured with an initial context that maps the
            * URI {@code path} to a <i>file handler</i>. The <i>file handler</i> is
            * created as if by an invocation of
            * {@link #createFileHandler(Path) createFileHandler(rootDirectory)}, and is
            * associated to a context created as if by an invocation of
      -     * {@link HttpServer#createContext(String) createContext("/")}.
      +     * {@link HttpServer#createContext(String) createContext("/")}. The returned
      +     * server is not started.
            *

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jboes Julia Boes (Inactive)
              Reporter:
              jboes Julia Boes (Inactive)
              Reviewed By:
              Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: