RFR: 8359809: AttributeList, RoleList and UnresolvedRoleList should never accept other types of Object [v5]

Kevin Walls kevinw at openjdk.org
Thu Jul 10 07:58:00 UTC 2025


On Wed, 9 Jul 2025 23:14:19 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Further doc update
>>  - Test udpate (listIterator)
>
> test/jdk/javax/management/generified/ListTypeCheckTest.java line 105:
> 
>> 103:                         ListIterator iter2 = al.listIterator();
>> 104:                         Object x2 = iter2.next();
>> 105:                         iter2.add("blah");
> 
> Nit: The case #6 is exactly the same as #5.
> Q: Why is it needed?
> I'd suggest to add a comment explaining this case.
> The line 105 should have a comment as at the line 99.
> In general, this test has a lack of comments explaining tests cases (was before your fix).

These cases test the ListIterator operations, one case for set, one case for add.  Will update with comment to clarify.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25856#discussion_r2196896204


More information about the serviceability-dev mailing list