[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v8]
From: Per Minborg <pminborg () openjdk ! org>
Date: 2024-04-24 11:59:15
Message-ID: pPLDryemgOYiiTFVA0-bkRUKQaHhfS0V0wFJrZcXS1E=.2756273a-3b5d-47da-b732-a6136f82a12c () github ! com
[Download RAW message or body]
> While `SymbolLookup` correctly uses an `Optional` return to denote whether a symbol \
> has been found by the lookup or not (which enables composition of symbol lookups), \
> many clients end up just calling `Optional::get`, or `Optional::orElseThrow()` on \
> the result.
> This PR proposes to add a convenience method `SymbolLookup::findOrThrow` that will \
> do a lookup and, if no symbol can be found, throws an `IllegalArgumentException` \
> with a relevant exception message.
Per Minborg has updated the pull request incrementally with one additional commit \
since the last revision:
Remove redundant test
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18474/files
- new: https://git.openjdk.org/jdk/pull/18474/files/0e06e0d6..31d92589
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18474&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18474&range=06-07
Stats: 7 lines in 1 file changed: 0 ins; 7 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/18474.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18474/head:pull/18474
PR: https://git.openjdk.org/jdk/pull/18474
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic