On Thu, 16 Jul 2026 14:55:15 GMT, Adam Sotona <[email protected]> wrote:

>> A few fail-safe convenience methods added in #23548 are missing necessary 
>> null checks. In addition, the `PackageEntry` symbolic conversion and testing 
>> methods are not correctly rejecting `PackageDesc` representing the unnamed 
>> package, a deliberate choice when `PackageDesc` was added to Java.
>> 
>> Luckily, these oversights can be easily fixed and verified with minor 
>> enhancements to existing tests. There are also accompanying minor doc 
>> enhancements about the situation.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> test/jdk/jdk/classfile/ConstantDescSymbolsTest.java line 190:
> 
>> 188:     @ParameterizedTest
>> 189:     @MethodSource("equalityCases")
>> 190:     <T, P extends PoolEntry> void 
>> testMatchesOriginalEquality(ValidSymbolCase<T, P> validSymbolCase, String 
>> entryState, P p) {
> 
> Isn't this weakening the lazy-state coverage. The previous separate matches 
> on fresh entries.

You are right. I forgot about this feature of cache stages.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31925#discussion_r3596540742

Reply via email to