changeset 52919:350f92339d2f datum

updating Class::getRecordParameterNames to use native methods
author vromero
date Fri, 26 Oct 2018 12:41:08 -0400
parents f9cc2fc9cf12
children 30e15200fb90 716341307709
files src/java.base/share/classes/java/lang/Class.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Class.java	Fri Oct 26 12:01:57 2018 -0400
+++ b/src/java.base/share/classes/java/lang/Class.java	Fri Oct 26 12:41:08 2018 -0400
@@ -3549,12 +3549,12 @@
      * @return an array with the names of the components
      * @since 1.12
      */
-    public String[] getRecordComponentNames() {
+    public String[] getRecordParameterNames() {
         if (isRecord()) {
-            Field[] fields = privateGetDeclaredFields(false);
-            String[] names = new String[fields.length];
+            Field[] recordParameters = getRecordParameters();
+            String[] names = new String[recordParameters.length];
             int i = 0;
-            for (Field field : fields) {
+            for (Field field : recordParameters) {
                 names[i] = field.getName();
                 i++;
             }