RFR: 8057543: Replace javac's Filter with Predicate (and lambdas) [v2]

Guoxiong Li gli at openjdk.java.net
Wed Apr 21 15:33:03 UTC 2021


On Wed, 21 Apr 2021 14:06:12 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>> 
>>  - Remove file Filter.java
>>  - Update copyright
>>  - Merge branch 'master' into JDK-8057543
>>    
>>    # Conflicts:
>>    #	src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java
>>  - Add comments.
>>  - 8057543: Replace javac's Filter with Predicate (and lambdas)
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacScope.java line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
> 
> copyright in this (and other files need to be updated)

Fixed.

> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 94:
> 
>> 92:     final Symtab syms;
>> 93:     final JavacMessages messages;
>> 94:     private Names names;
> 
> where is this change coming from?

When building the JDK, I got the following error:


jdk/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java:950: error: variable names might not have been initialized
                    t.name != names.init &&
                              ^
1 error


Therefore I revised the modifier of the `Names names`.

> src/jdk.compiler/share/classes/com/sun/tools/javac/util/Filter.java line 36:
> 
>> 34:  * instead of {@link com.sun.tools.javac.util.Filter}.
>> 35:  */
>> 36: @Deprecated(forRemoval = true, since = "17")
> 
> This is not a public API - we're in a JDK internal class - if this class is no longer needed (as is the goal of this change) simply remove it :-)

Fixed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1898


More information about the compiler-dev mailing list