On Tue, 31 Mar 2026 13:46:18 GMT, Chen Liang <[email protected]> wrote:

>> test/langtools/tools/lib/builder/ClassBuilder.java line 160:
>> 
>>> 158:     public ClassBuilder setExtends(String name) {
>>> 159:         if (modifiers.isInterface()) {
>>> 160:             implementsTypes.add(name);
>> 
>> Nit: This assumes that `setModifiers` is invoked before `setExtends`, which 
>> makes sense, but maybe add an explicit assert here that modifiers is not 
>> empty?
>
> I should just update Modifiers.isInterface to throw an ISE if the list empty.

Good suggestion, this does reveal 2 tests that set extends before modifiers are 
ready.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30435#discussion_r3016272943

Reply via email to