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.
*
- csr of
-
JDK-8278154 SimpleFileServer#createFileServer() should specify that the returned server is not started
-
- Resolved
-
- links to
-
Review openjdk/jdk/6674