8284871: Use covariant overrides for the resolveConstantDesc(Lookup) method in sub‑interfaces of java.lang.constant.ConstantDesc

Reviewed-by: mchung
This commit is contained in:
Chen Liang 2023-04-11 13:40:56 +00:00 committed by Mandy Chung
parent cd7d53c88c
commit e5ce7d9e43
15 changed files with 100 additions and 83 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -204,6 +204,9 @@ public sealed interface MethodHandleDesc
*/
MethodTypeDesc invocationType();
@Override
MethodHandle resolveConstantDesc(MethodHandles.Lookup lookup) throws ReflectiveOperationException;
/**
* Compares the specified object with this descriptor for equality. Returns
* {@code true} if and only if the specified object is also a