changeset 51554:1469f48bf928 datum

changing the impl for Class::isRecord
author vromero
date Wed, 11 Jul 2018 15:13:07 -0700
parents 1d32d49d12eb
children b139131bfcbd
files src/java.base/share/classes/java/lang/Class.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Class.java	Wed Jul 11 14:30:16 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Class.java	Wed Jul 11 15:13:07 2018 -0700
@@ -3515,7 +3515,7 @@
      */
     public boolean isRecord() {
         // A record must directly extend java.lang.AbstractRecord
-        return this.getSuperclass() == java.lang.AbstractRecord.class;
+        return AbstractRecord.class.isAssignableFrom(this);
     }
 
     // Fetches the factory for reflective objects