changeset 41891:92539b6985a5

8168681: Correct deprecation text for Class.newInstance Reviewed-by: mchung
author darcy
date Thu, 03 Nov 2016 13:06:24 -0700
parents ab67b8f4f2fe
children 7cdc6dfe9c9b
files jdk/src/java.base/share/classes/java/lang/Class.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.base/share/classes/java/lang/Class.java	Thu Nov 03 16:19:29 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/Class.java	Thu Nov 03 13:06:24 2016 -0700
@@ -485,7 +485,7 @@
      * can be replaced by
      *
      * <pre>{@code
-     * clazz.getConstructor().newInstance()
+     * clazz.getDeclaredConstructor().newInstance()
      * }</pre>
      *
      * The latter sequence of calls is inferred to be able to throw