RFR: 8268056: Update java.net and java.nio to use switch expressions [v5]

Patrick Concannon pconcannon at openjdk.java.net
Thu Jun 3 10:12:07 UTC 2021


On Thu, 3 Jun 2021 05:51:59 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Patrick Concannon 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 six additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'origin/master' into JDK-8268056
>>  - 8268056: Added yield to switch expression in Files
>>  - 8268056: reverted changes to FileTime
>>  - Merge remote-tracking branch 'origin/master' into JDK-8268056
>>  - 8268056: Reverted changes to URLDecoder; reformatted change to FileTime
>>  - 8268056: Update java.net and java.nio to use switch expressions
>
> src/java.base/share/classes/java/nio/file/Files.java line 2817:
> 
>> 2815:                     }
>> 2816:                     case START_DIRECTORY -> {
>> 2817:                         var r = visitor.preVisitDirectory(ev.file(), ev.attributes());
> 
> Can you changes the uses of "r" with "res" to make it little bit clear that it's a result, that will get it a bit more consistent with the exist code? Otherwise I think this version is okay.

Updated variable name as requested. See dec6d20

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

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


More information about the nio-dev mailing list