On Thu, 16 Mar 2023 16:06:15 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> This plugin does not fit to the Classfile API use cases portfolio at all. 
>> Here it is only needed to get interfaces list out of the constant pool and 
>> then the Utf8 CP entries are in-place modified. That is out of the Classfile 
>> API or ASM capabilities. Bad magic number is not the only difference, both 
>> libraries fail whenever touching even headers of any other standard 
>> classfile elements, only constant pool and interfaces seem to be "safe". 
>> I can prepare very simple standalone helper class dealing with this case to 
>> remove ASM dependency. 
>> However knowing more about the file format is always useful :)
>
> The file `LineBreakIteratorData_th` is not a class file, thus the exception 
> is appropriate. This plugin test is trying to verify the integrity of the 
> generated jimage, not only the required class files for the specified locale, 
> but also the required resources as such. The file itself is a binary file 
> that the BreakIterator uses internally.

@naotoj as these localedata resource files are not `.class`, the plugin should 
not use ASM (or Classfile API) to parse it but ASM ClassReader just happens to 
work.   Is the format documented anywhere?

@asotona  I agree that this ASM dependency should be replaced with a simple 
class to parse the localedata resources.   We can create a follow-up issue to 
document or validate the file format if appropriate.

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

PR: https://git.openjdk.org/jdk/pull/12944

Reply via email to