8242478: compiler implementation for records (Second Preview)

Reviewed-by: mcimadamore, jlahoda, darcy
This commit is contained in:
Vicente Romero 2020-05-17 11:09:52 -04:00
parent a2057ad440
commit 9efdaacc31
31 changed files with 833 additions and 182 deletions

View file

@ -1585,7 +1585,7 @@ public class ObjectStreamClass implements Serializable {
.map(RecordComponent::getType)
.toArray(Class<?>[]::new);
try {
Constructor<?> ctr = cls.getConstructor(paramTypes);
Constructor<?> ctr = cls.getDeclaredConstructor(paramTypes);
ctr.setAccessible(true);
return MethodHandles.lookup().unreflectConstructor(ctr);
} catch (IllegalAccessException | NoSuchMethodException e) {