RFR: 8247536: Support for pre-generated java.lang.invoke classes in CDS static archive [v12]
Ioi Lam
iklam at openjdk.java.net
Thu Oct 8 20:07:24 UTC 2020
On Wed, 7 Oct 2020 21:49:24 GMT, Yumin Qi <minqi at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/misc/CDS.java line 144:
>>
>>> 142: String line = s.trim();
>>> 143: if (!line.startsWith("[LF_RESOLVE]") && !line.startsWith("[SPECIES_RESOLVE]")) {
>>> 144: System.out.println("Wrong prefix: " + line);
>>
>> Should this throw an exception instead?
>
> This part is for check the format only, throw exceptions will lead more objects generated which should not be archived
> in shared heap. Since this is only called from VM, so decide not to throw exception here.
The exception object will not be automatically added to the shared heap, so it's OK to throw exceptions here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/193
More information about the build-dev
mailing list