-
Enhancement
-
Resolution: Fixed
-
P4
-
17
-
Fix Understood
-
generic
-
generic
The JEP-394 implemented pattern matching for instanceof at JDK-16. Please see https://openjdk.java.net/jeps/394 for more information.
It is nice for javac to update the code to make use of pattern matching for instanceof.
I used the command `grep -r "instanceof" src/jdk.compiler > instanceof.txt` to search the code which may need to be revised. Then I identified all the entries manually and marked the entries which actually need to be revised. Please see the attachment `instanceof.txt`. The entries with "!" need to be revised.
According to the `instanceof.txt`, I created three sub-tasks to avoid the complication of a simgle patch. And the packages that are not mentioned at the sub-tasks don't need to be revised.
It is nice for javac to update the code to make use of pattern matching for instanceof.
I used the command `grep -r "instanceof" src/jdk.compiler > instanceof.txt` to search the code which may need to be revised. Then I identified all the entries manually and marked the entries which actually need to be revised. Please see the attachment `instanceof.txt`. The entries with "!" need to be revised.
According to the `instanceof.txt`, I created three sub-tasks to avoid the complication of a simgle patch. And the packages that are not mentioned at the sub-tasks don't need to be revised.