8223321: jpackage ToolProvider is not thread-safe JDK-8200758-branch
authorkcr
Fri, 03 May 2019 11:28:14 -0700
branchJDK-8200758-branch
changeset 57349 c6cd128bf0cd
parent 57348 d3a667ff5579
child 57350 bf3d37105ef9
8223321: jpackage ToolProvider is not thread-safe Reviewed-by:
src/jdk.jpackage/share/classes/module-info.java
--- a/src/jdk.jpackage/share/classes/module-info.java	Fri May 03 14:51:28 2019 -0400
+++ b/src/jdk.jpackage/share/classes/module-info.java	Fri May 03 11:28:14 2019 -0700
@@ -35,6 +35,13 @@
  * or the {@link java.util.ServiceLoader service loader} with the name
  * {@code "jpackage"}.
  *
+ * @implNote The {@code jpackage} tool is not thread-safe. An application
+ * should not call either of the
+ * {@link java.util.spi.ToolProvider ToolProvider} {@code run} methods
+ * concurrently, even with separate {@code "jpackage"} {@code ToolProvider}
+ * instances, or undefined behavior may result.
+ * <p></p>
+ *
  * @moduleGraph
  * @since 13
  */