On Thu, 20 Jun 2024 16:58:55 GMT, Alan Bateman <[email protected]> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
>> line 93:
>>
>>> 91: }
>>> 92:
>>> 93: public PlatformDescription getPlatformTrusted(String platformName) {
>>
>> I noticed that `getPlatform` was not throwing an exception if the release
>> was not valid, which then later results in an NPE. I've added an explicit
>> check here instead. The caller can then catch the exception.
>
> I see the "options" arg is not used so maybe another approach here is a
> one-arg getPlatform that throws PlatformNotSupported and then migrate the
> other usages at another time.
>
> (This is just a passing comment, not important for the core of this feature).
We probably can eliminate the `options` (which is a historical artifact), but I
don't think it needs to be done here
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19774#discussion_r1649307870