On Wed, 18 Sep 2024 05:18:13 GMT, Chen Liang <[email protected]> wrote:
>> Ioi Lam has updated the pull request with a new target base due to a merge
>> or a rebase. The incremental webrev excludes the unrelated changes brought
>> in by the merge/rebase. The pull request contains eight additional commits
>> since the last revision:
>>
>> - @dholmes-ora review comments
>> - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics'
>> of /jdk3/yam/open into
>> jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>> - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics'
>> of /jdk3/yam/open into
>> jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>> - Do not use system property to limit usage to only CDS static dumps
>> - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics'
>> of /jdk3/yam/open into
>> jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>> - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics'
>> of /jdk3/yak/open into
>> jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>> - Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsics'
>> of /jdk3/yak/open into
>> jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-invoke
>> - 8311071: Add an option to avoid using SoftReferences in
>> java.lang.invoke.MethodHandle
>
> src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java line 148:
>
>> 146: public LambdaForm get() {
>> 147: if (cache instanceof LambdaForm) {
>> 148: return (LambdaForm)cache;
>
> Suggestion:
>
> if (cache instanceof LambdaForm lf) {
> return lf;
Fixed. Thanks for the suggestion.
> src/java.base/share/classes/java/lang/invoke/MethodTypeForm.java line 119:
>
>> 117: return null;
>> 118: } else if (entry instanceof MethodHandle) {
>> 119: return (MethodHandle) entry;
>
> Suggestion:
>
> } else if (entry instanceof MethodHandle mh) {
> return mh;
Fixed.
> src/java.base/share/classes/java/lang/invoke/MethodTypeForm.java line 145:
>
>> 143: return null;
>> 144: } else if (entry instanceof LambdaForm) {
>> 145: return (LambdaForm) entry;
>
> Suggestion:
>
> } else if (entry instanceof LambdaForm lf) {
> return lf;
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21049#discussion_r1771936114
PR Review Comment: https://git.openjdk.org/jdk/pull/21049#discussion_r1771936246
PR Review Comment: https://git.openjdk.org/jdk/pull/21049#discussion_r1771936365