On Thu, 3 Sep 2026 18:25:52 GMT, Tushar saini <[email protected]> wrote:

> I did a quick search and couldn’t find real frameworks passing an array class 
> to ServiceLoader; it seems like a fuzzing/differential-testing edge case. I 
> agree IAE is better here since an empty loader could hide a real caller bug.

Can you provide some context as to how you ran into the issue? Are you the 
submitter of that bug? It's not clear if was encountered with something real or 
a fuzzer.

In any case, I attached 
[IllegalServiceTypes1](https://bugs.openjdk.org/secure/attachment/121535/IllegalServiceTypes1.patch)
 and 
[IllegalServiceTypes2](https://bugs.openjdk.org/secure/attachment/121535/IllegalServiceTypes2.patch)
 to the JBS issue with how SCE vs. IAE would look. IllegalServiceTypes2 is a 
bit better than what you propose in this PR because it keeps the checks in the 
private constructor and has a much more complete test. More work would required 
on both for the class description.

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

PR Comment: https://git.openjdk.org/jdk/pull/32515#issuecomment-5530865513

Reply via email to