Re: RFR: 8268124: Update java.lang to use switch expressions [v4]
> Hi, > > Could someone please review my code for updating the code in the `java.lang` > packages to make use of the switch expressions? > > Kind regards, > Patrick 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 four additional commits since the last revision: - Merge remote-tracking branch 'origin/master' into JDK-8268124 - 8268124: small refactoring; fixed misplaced comment and added missing lambda operator - Merge remote-tracking branch 'origin/master' into JDK-8268124 - 8268124: Update java.lang to use switch expressions - Changes: - all: https://git.openjdk.java.net/jdk/pull/4312/files - new: https://git.openjdk.java.net/jdk/pull/4312/files/a8706b02..7907f3eb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=4312=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk=4312=02-03 Stats: 463928 lines in 821 files changed: 455007 ins; 5063 del; 3858 mod Patch: https://git.openjdk.java.net/jdk/pull/4312.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4312/head:pull/4312 PR: https://git.openjdk.java.net/jdk/pull/4312
Re: RFR: 8268124: Update java.lang to use switch expressions [v4]
On Wed, 2 Jun 2021 16:10:19 GMT, RĂ©mi Forax 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 four additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/master' into JDK-8268124 >> - 8268124: small refactoring; fixed misplaced comment and added missing >> lambda operator >> - Merge remote-tracking branch 'origin/master' into JDK-8268124 >> - 8268124: Update java.lang to use switch expressions > > src/java.base/share/classes/java/lang/invoke/MemberName.java line 331: > >> 329: assert(false) : this+" != >> "+MethodHandleNatives.refKindName((byte)originalRefKind); >> 330: yield true; >> 331: } > > this code always yield true, better to check if the assert are enabled, do > the switch in that case and always return true Thanks for your suggestion. I've incorporated it into commit a8706b0 - PR: https://git.openjdk.java.net/jdk/pull/4312